imate
C++/CUDA Reference
py_c_linear_operator.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.36 */
2 
3 /* BEGIN: Cython Metadata
4 {
5  "distutils": {
6  "define_macros": [
7  [
8  "CYTHON_EXTERN_C",
9  "extern \"C\""
10  ],
11  [
12  "CYTHON_EXTERN_C",
13  "extern \"C\""
14  ],
15  [
16  "CYTHON_EXTERN_C",
17  "extern \"C\""
18  ],
19  [
20  "CYTHON_EXTERN_C",
21  "extern \"C\""
22  ],
23  [
24  "CYTHON_EXTERN_C",
25  "extern \"C\""
26  ],
27  [
28  "CYTHON_EXTERN_C",
29  "extern \"C\""
30  ],
31  [
32  "CYTHON_EXTERN_C",
33  "extern \"C\""
34  ],
35  [
36  "CYTHON_EXTERN_C",
37  "extern \"C\""
38  ],
39  [
40  "CYTHON_EXTERN_C",
41  "extern \"C\""
42  ],
43  [
44  "CYTHON_EXTERN_C",
45  "extern \"C\""
46  ],
47  [
48  "CYTHON_EXTERN_C",
49  "extern \"C\""
50  ],
51  [
52  "CYTHON_EXTERN_C",
53  "extern \"C\""
54  ],
55  [
56  "CYTHON_EXTERN_C",
57  "extern \"C\""
58  ],
59  [
60  "CYTHON_EXTERN_C",
61  "extern \"C\""
62  ],
63  [
64  "CYTHON_EXTERN_C",
65  "extern \"C\""
66  ]
67  ],
68  "depends": [
69  "imate/_c_linear_operator/c_linear_operator.h",
70  "imate/_definitions/definitions.h"
71  ],
72  "include_dirs": [
73  "./imate/_c_linear_operator",
74  "./imate/_definitions",
75  "i",
76  "m",
77  "a",
78  "t",
79  "e",
80  "/",
81  "_",
82  "c",
83  "b",
84  "s",
85  "l",
86  "g",
87  "r"
88  ],
89  "language": "c++",
90  "name": "imate._c_linear_operator.py_c_linear_operator",
91  "sources": [
92  "./imate/_c_linear_operator/py_c_linear_operator.pyx",
93  "./imate/_c_linear_operator/c_csc_matrix.cpp",
94  "./imate/_c_linear_operator/c_linear_operator.cpp",
95  "./imate/_c_linear_operator/c_matrix.cpp",
96  "./imate/_c_linear_operator/c_affine_matrix_function.cpp",
97  "./imate/_c_linear_operator/c_dense_affine_matrix_function.cpp",
98  "./imate/_c_linear_operator/c_csr_matrix.cpp",
99  "./imate/_c_linear_operator/c_csr_affine_matrix_function.cpp",
100  "./imate/_c_linear_operator/c_csc_affine_matrix_function.cpp",
101  "./imate/_c_linear_operator/c_dense_matrix.cpp",
102  "imate/_c_basic_algebra/c_vector_operations.cpp",
103  "imate/_c_basic_algebra/c_matrix_operations.cpp",
104  "imate/_c_basic_algebra/cblas_interface.cpp"
105  ]
106  },
107  "module_name": "imate._c_linear_operator.py_c_linear_operator"
108 }
109 END: Cython Metadata */
110 
111 #ifndef PY_SSIZE_T_CLEAN
112 #define PY_SSIZE_T_CLEAN
113 #endif /* PY_SSIZE_T_CLEAN */
114 #include "Python.h"
115 #ifndef Py_PYTHON_H
116  #error Python headers needed to compile C extensions, please install development version of Python.
117 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
118  #error Cython requires Python 2.6+ or Python 3.3+.
119 #else
120 #define CYTHON_ABI "0_29_36"
121 #define CYTHON_HEX_VERSION 0x001D24F0
122 #define CYTHON_FUTURE_DIVISION 1
123 #include <stddef.h>
124 #ifndef offsetof
125  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
126 #endif
127 #if !defined(WIN32) && !defined(MS_WINDOWS)
128  #ifndef __stdcall
129  #define __stdcall
130  #endif
131  #ifndef __cdecl
132  #define __cdecl
133  #endif
134  #ifndef __fastcall
135  #define __fastcall
136  #endif
137 #endif
138 #ifndef DL_IMPORT
139  #define DL_IMPORT(t) t
140 #endif
141 #ifndef DL_EXPORT
142  #define DL_EXPORT(t) t
143 #endif
144 #define __PYX_COMMA ,
145 #ifndef HAVE_LONG_LONG
146  #if PY_VERSION_HEX >= 0x02070000
147  #define HAVE_LONG_LONG
148  #endif
149 #endif
150 #ifndef PY_LONG_LONG
151  #define PY_LONG_LONG LONG_LONG
152 #endif
153 #ifndef Py_HUGE_VAL
154  #define Py_HUGE_VAL HUGE_VAL
155 #endif
156 #ifdef PYPY_VERSION
157  #define CYTHON_COMPILING_IN_PYPY 1
158  #define CYTHON_COMPILING_IN_PYSTON 0
159  #define CYTHON_COMPILING_IN_CPYTHON 0
160  #define CYTHON_COMPILING_IN_NOGIL 0
161  #undef CYTHON_USE_TYPE_SLOTS
162  #define CYTHON_USE_TYPE_SLOTS 0
163  #undef CYTHON_USE_PYTYPE_LOOKUP
164  #define CYTHON_USE_PYTYPE_LOOKUP 0
165  #if PY_VERSION_HEX < 0x03050000
166  #undef CYTHON_USE_ASYNC_SLOTS
167  #define CYTHON_USE_ASYNC_SLOTS 0
168  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
169  #define CYTHON_USE_ASYNC_SLOTS 1
170  #endif
171  #undef CYTHON_USE_PYLIST_INTERNALS
172  #define CYTHON_USE_PYLIST_INTERNALS 0
173  #undef CYTHON_USE_UNICODE_INTERNALS
174  #define CYTHON_USE_UNICODE_INTERNALS 0
175  #undef CYTHON_USE_UNICODE_WRITER
176  #define CYTHON_USE_UNICODE_WRITER 0
177  #undef CYTHON_USE_PYLONG_INTERNALS
178  #define CYTHON_USE_PYLONG_INTERNALS 0
179  #undef CYTHON_AVOID_BORROWED_REFS
180  #define CYTHON_AVOID_BORROWED_REFS 1
181  #undef CYTHON_ASSUME_SAFE_MACROS
182  #define CYTHON_ASSUME_SAFE_MACROS 0
183  #undef CYTHON_UNPACK_METHODS
184  #define CYTHON_UNPACK_METHODS 0
185  #undef CYTHON_FAST_THREAD_STATE
186  #define CYTHON_FAST_THREAD_STATE 0
187  #undef CYTHON_FAST_PYCALL
188  #define CYTHON_FAST_PYCALL 0
189  #if PY_VERSION_HEX < 0x03090000
190  #undef CYTHON_PEP489_MULTI_PHASE_INIT
191  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
192  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
193  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
194  #endif
195  #undef CYTHON_USE_TP_FINALIZE
196  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
197  #undef CYTHON_USE_DICT_VERSIONS
198  #define CYTHON_USE_DICT_VERSIONS 0
199  #undef CYTHON_USE_EXC_INFO_STACK
200  #define CYTHON_USE_EXC_INFO_STACK 0
201  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
202  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
203  #endif
204 #elif defined(PYSTON_VERSION)
205  #define CYTHON_COMPILING_IN_PYPY 0
206  #define CYTHON_COMPILING_IN_PYSTON 1
207  #define CYTHON_COMPILING_IN_CPYTHON 0
208  #define CYTHON_COMPILING_IN_NOGIL 0
209  #ifndef CYTHON_USE_TYPE_SLOTS
210  #define CYTHON_USE_TYPE_SLOTS 1
211  #endif
212  #undef CYTHON_USE_PYTYPE_LOOKUP
213  #define CYTHON_USE_PYTYPE_LOOKUP 0
214  #undef CYTHON_USE_ASYNC_SLOTS
215  #define CYTHON_USE_ASYNC_SLOTS 0
216  #undef CYTHON_USE_PYLIST_INTERNALS
217  #define CYTHON_USE_PYLIST_INTERNALS 0
218  #ifndef CYTHON_USE_UNICODE_INTERNALS
219  #define CYTHON_USE_UNICODE_INTERNALS 1
220  #endif
221  #undef CYTHON_USE_UNICODE_WRITER
222  #define CYTHON_USE_UNICODE_WRITER 0
223  #undef CYTHON_USE_PYLONG_INTERNALS
224  #define CYTHON_USE_PYLONG_INTERNALS 0
225  #ifndef CYTHON_AVOID_BORROWED_REFS
226  #define CYTHON_AVOID_BORROWED_REFS 0
227  #endif
228  #ifndef CYTHON_ASSUME_SAFE_MACROS
229  #define CYTHON_ASSUME_SAFE_MACROS 1
230  #endif
231  #ifndef CYTHON_UNPACK_METHODS
232  #define CYTHON_UNPACK_METHODS 1
233  #endif
234  #undef CYTHON_FAST_THREAD_STATE
235  #define CYTHON_FAST_THREAD_STATE 0
236  #undef CYTHON_FAST_PYCALL
237  #define CYTHON_FAST_PYCALL 0
238  #undef CYTHON_PEP489_MULTI_PHASE_INIT
239  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
240  #undef CYTHON_USE_TP_FINALIZE
241  #define CYTHON_USE_TP_FINALIZE 0
242  #undef CYTHON_USE_DICT_VERSIONS
243  #define CYTHON_USE_DICT_VERSIONS 0
244  #undef CYTHON_USE_EXC_INFO_STACK
245  #define CYTHON_USE_EXC_INFO_STACK 0
246  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
247  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
248  #endif
249 #elif defined(PY_NOGIL)
250  #define CYTHON_COMPILING_IN_PYPY 0
251  #define CYTHON_COMPILING_IN_PYSTON 0
252  #define CYTHON_COMPILING_IN_CPYTHON 0
253  #define CYTHON_COMPILING_IN_NOGIL 1
254  #ifndef CYTHON_USE_TYPE_SLOTS
255  #define CYTHON_USE_TYPE_SLOTS 1
256  #endif
257  #undef CYTHON_USE_PYTYPE_LOOKUP
258  #define CYTHON_USE_PYTYPE_LOOKUP 0
259  #ifndef CYTHON_USE_ASYNC_SLOTS
260  #define CYTHON_USE_ASYNC_SLOTS 1
261  #endif
262  #undef CYTHON_USE_PYLIST_INTERNALS
263  #define CYTHON_USE_PYLIST_INTERNALS 0
264  #ifndef CYTHON_USE_UNICODE_INTERNALS
265  #define CYTHON_USE_UNICODE_INTERNALS 1
266  #endif
267  #undef CYTHON_USE_UNICODE_WRITER
268  #define CYTHON_USE_UNICODE_WRITER 0
269  #undef CYTHON_USE_PYLONG_INTERNALS
270  #define CYTHON_USE_PYLONG_INTERNALS 0
271  #ifndef CYTHON_AVOID_BORROWED_REFS
272  #define CYTHON_AVOID_BORROWED_REFS 0
273  #endif
274  #ifndef CYTHON_ASSUME_SAFE_MACROS
275  #define CYTHON_ASSUME_SAFE_MACROS 1
276  #endif
277  #ifndef CYTHON_UNPACK_METHODS
278  #define CYTHON_UNPACK_METHODS 1
279  #endif
280  #undef CYTHON_FAST_THREAD_STATE
281  #define CYTHON_FAST_THREAD_STATE 0
282  #undef CYTHON_FAST_PYCALL
283  #define CYTHON_FAST_PYCALL 0
284  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
285  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
286  #endif
287  #ifndef CYTHON_USE_TP_FINALIZE
288  #define CYTHON_USE_TP_FINALIZE 1
289  #endif
290  #undef CYTHON_USE_DICT_VERSIONS
291  #define CYTHON_USE_DICT_VERSIONS 0
292  #undef CYTHON_USE_EXC_INFO_STACK
293  #define CYTHON_USE_EXC_INFO_STACK 0
294 #else
295  #define CYTHON_COMPILING_IN_PYPY 0
296  #define CYTHON_COMPILING_IN_PYSTON 0
297  #define CYTHON_COMPILING_IN_CPYTHON 1
298  #define CYTHON_COMPILING_IN_NOGIL 0
299  #ifndef CYTHON_USE_TYPE_SLOTS
300  #define CYTHON_USE_TYPE_SLOTS 1
301  #endif
302  #if PY_VERSION_HEX < 0x02070000
303  #undef CYTHON_USE_PYTYPE_LOOKUP
304  #define CYTHON_USE_PYTYPE_LOOKUP 0
305  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
306  #define CYTHON_USE_PYTYPE_LOOKUP 1
307  #endif
308  #if PY_MAJOR_VERSION < 3
309  #undef CYTHON_USE_ASYNC_SLOTS
310  #define CYTHON_USE_ASYNC_SLOTS 0
311  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
312  #define CYTHON_USE_ASYNC_SLOTS 1
313  #endif
314  #if PY_VERSION_HEX < 0x02070000
315  #undef CYTHON_USE_PYLONG_INTERNALS
316  #define CYTHON_USE_PYLONG_INTERNALS 0
317  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
318  #define CYTHON_USE_PYLONG_INTERNALS (PY_VERSION_HEX < 0x030C00A5)
319  #endif
320  #ifndef CYTHON_USE_PYLIST_INTERNALS
321  #define CYTHON_USE_PYLIST_INTERNALS 1
322  #endif
323  #ifndef CYTHON_USE_UNICODE_INTERNALS
324  #define CYTHON_USE_UNICODE_INTERNALS 1
325  #endif
326  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
327  #undef CYTHON_USE_UNICODE_WRITER
328  #define CYTHON_USE_UNICODE_WRITER 0
329  #elif !defined(CYTHON_USE_UNICODE_WRITER)
330  #define CYTHON_USE_UNICODE_WRITER 1
331  #endif
332  #ifndef CYTHON_AVOID_BORROWED_REFS
333  #define CYTHON_AVOID_BORROWED_REFS 0
334  #endif
335  #ifndef CYTHON_ASSUME_SAFE_MACROS
336  #define CYTHON_ASSUME_SAFE_MACROS 1
337  #endif
338  #ifndef CYTHON_UNPACK_METHODS
339  #define CYTHON_UNPACK_METHODS 1
340  #endif
341  #if PY_VERSION_HEX >= 0x030B00A4
342  #undef CYTHON_FAST_THREAD_STATE
343  #define CYTHON_FAST_THREAD_STATE 0
344  #elif !defined(CYTHON_FAST_THREAD_STATE)
345  #define CYTHON_FAST_THREAD_STATE 1
346  #endif
347  #ifndef CYTHON_FAST_PYCALL
348  #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
349  #endif
350  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
351  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
352  #endif
353  #ifndef CYTHON_USE_TP_FINALIZE
354  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
355  #endif
356  #ifndef CYTHON_USE_DICT_VERSIONS
357  #define CYTHON_USE_DICT_VERSIONS ((PY_VERSION_HEX >= 0x030600B1) && (PY_VERSION_HEX < 0x030C00A5))
358  #endif
359  #if PY_VERSION_HEX >= 0x030B00A4
360  #undef CYTHON_USE_EXC_INFO_STACK
361  #define CYTHON_USE_EXC_INFO_STACK 0
362  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
363  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
364  #endif
365  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
366  #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
367  #endif
368 #endif
369 #if !defined(CYTHON_FAST_PYCCALL)
370 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
371 #endif
372 #if CYTHON_USE_PYLONG_INTERNALS
373  #if PY_MAJOR_VERSION < 3
374  #include "longintrepr.h"
375  #endif
376  #undef SHIFT
377  #undef BASE
378  #undef MASK
379  #ifdef SIZEOF_VOID_P
380  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
381  #endif
382 #endif
383 #ifndef __has_attribute
384  #define __has_attribute(x) 0
385 #endif
386 #ifndef __has_cpp_attribute
387  #define __has_cpp_attribute(x) 0
388 #endif
389 #ifndef CYTHON_RESTRICT
390  #if defined(__GNUC__)
391  #define CYTHON_RESTRICT __restrict__
392  #elif defined(_MSC_VER) && _MSC_VER >= 1400
393  #define CYTHON_RESTRICT __restrict
394  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
395  #define CYTHON_RESTRICT restrict
396  #else
397  #define CYTHON_RESTRICT
398  #endif
399 #endif
400 #ifndef CYTHON_UNUSED
401 # if defined(__GNUC__)
402 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
403 # define CYTHON_UNUSED __attribute__ ((__unused__))
404 # else
405 # define CYTHON_UNUSED
406 # endif
407 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
408 # define CYTHON_UNUSED __attribute__ ((__unused__))
409 # else
410 # define CYTHON_UNUSED
411 # endif
412 #endif
413 #ifndef CYTHON_MAYBE_UNUSED_VAR
414 # if defined(__cplusplus)
415  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
416 # else
417 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
418 # endif
419 #endif
420 #ifndef CYTHON_NCP_UNUSED
421 # if CYTHON_COMPILING_IN_CPYTHON
422 # define CYTHON_NCP_UNUSED
423 # else
424 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
425 # endif
426 #endif
427 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
428 #ifdef _MSC_VER
429  #ifndef _MSC_STDINT_H_
430  #if _MSC_VER < 1300
431  typedef unsigned char uint8_t;
432  typedef unsigned int uint32_t;
433  #else
434  typedef unsigned __int8 uint8_t;
435  typedef unsigned __int32 uint32_t;
436  #endif
437  #endif
438 #else
439  #include <stdint.h>
440 #endif
441 #ifndef CYTHON_FALLTHROUGH
442  #if defined(__cplusplus) && __cplusplus >= 201103L
443  #if __has_cpp_attribute(fallthrough)
444  #define CYTHON_FALLTHROUGH [[fallthrough]]
445  #elif __has_cpp_attribute(clang::fallthrough)
446  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
447  #elif __has_cpp_attribute(gnu::fallthrough)
448  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
449  #endif
450  #endif
451  #ifndef CYTHON_FALLTHROUGH
452  #if __has_attribute(fallthrough)
453  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
454  #else
455  #define CYTHON_FALLTHROUGH
456  #endif
457  #endif
458  #if defined(__clang__ ) && defined(__apple_build_version__)
459  #if __apple_build_version__ < 7000000
460  #undef CYTHON_FALLTHROUGH
461  #define CYTHON_FALLTHROUGH
462  #endif
463  #endif
464 #endif
465 
466 #ifndef __cplusplus
467  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
468 #endif
469 #ifndef CYTHON_INLINE
470  #if defined(__clang__)
471  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
472  #else
473  #define CYTHON_INLINE inline
474  #endif
475 #endif
476 template<typename T>
477 void __Pyx_call_destructor(T& x) {
478  x.~T();
479 }
480 template<typename T>
481 class __Pyx_FakeReference {
482  public:
483  __Pyx_FakeReference() : ptr(NULL) { }
484  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
485  T *operator->() { return ptr; }
486  T *operator&() { return ptr; }
487  operator T&() { return *ptr; }
488  template<typename U> bool operator ==(U other) { return *ptr == other; }
489  template<typename U> bool operator !=(U other) { return *ptr != other; }
490  private:
491  T *ptr;
492 };
493 
494 #define __PYX_BUILD_PY_SSIZE_T "n"
495 #define CYTHON_FORMAT_SSIZE_T "z"
496 #if PY_MAJOR_VERSION < 3
497  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
498  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
499  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
500  #define __Pyx_DefaultClassType PyClass_Type
501 #else
502  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
503  #define __Pyx_DefaultClassType PyType_Type
504 #if PY_VERSION_HEX >= 0x030B00A1
505  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
506  PyObject *code, PyObject *c, PyObject* n, PyObject *v,
507  PyObject *fv, PyObject *cell, PyObject* fn,
508  PyObject *name, int fline, PyObject *lnos) {
509  PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
510  PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
511  const char *fn_cstr=NULL;
512  const char *name_cstr=NULL;
513  PyCodeObject* co=NULL;
514  PyObject *type, *value, *traceback;
515  PyErr_Fetch(&type, &value, &traceback);
516  if (!(kwds=PyDict_New())) goto end;
517  if (!(argcount=PyLong_FromLong(a))) goto end;
518  if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
519  if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
520  if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
521  if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
522  if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
523  if (!(nlocals=PyLong_FromLong(l))) goto end;
524  if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
525  if (!(stacksize=PyLong_FromLong(s))) goto end;
526  if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
527  if (!(flags=PyLong_FromLong(f))) goto end;
528  if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
529  if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
530  if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
531  if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
532  if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
533  if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
534  if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
535  if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
536  if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
537  if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
538  if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
539  if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
540  if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
541  if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
542  Py_XDECREF((PyObject*)co);
543  co = (PyCodeObject*)call_result;
544  call_result = NULL;
545  if (0) {
546  cleanup_code_too:
547  Py_XDECREF((PyObject*)co);
548  co = NULL;
549  }
550  end:
551  Py_XDECREF(kwds);
552  Py_XDECREF(argcount);
553  Py_XDECREF(posonlyargcount);
554  Py_XDECREF(kwonlyargcount);
555  Py_XDECREF(nlocals);
556  Py_XDECREF(stacksize);
557  Py_XDECREF(replace);
558  Py_XDECREF(call_result);
559  Py_XDECREF(empty);
560  if (type) {
561  PyErr_Restore(type, value, traceback);
562  }
563  return co;
564  }
565 #else
566  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
567  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
568 #endif
569  #define __Pyx_DefaultClassType PyType_Type
570 #endif
571 #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
572  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
573 #else
574  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
575 #endif
576 #ifndef Py_TPFLAGS_CHECKTYPES
577  #define Py_TPFLAGS_CHECKTYPES 0
578 #endif
579 #ifndef Py_TPFLAGS_HAVE_INDEX
580  #define Py_TPFLAGS_HAVE_INDEX 0
581 #endif
582 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
583  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
584 #endif
585 #ifndef Py_TPFLAGS_HAVE_FINALIZE
586  #define Py_TPFLAGS_HAVE_FINALIZE 0
587 #endif
588 #ifndef METH_STACKLESS
589  #define METH_STACKLESS 0
590 #endif
591 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
592  #ifndef METH_FASTCALL
593  #define METH_FASTCALL 0x80
594  #endif
595  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
596  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
597  Py_ssize_t nargs, PyObject *kwnames);
598 #else
599  #define __Pyx_PyCFunctionFast _PyCFunctionFast
600  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
601 #endif
602 #if CYTHON_FAST_PYCCALL
603 #define __Pyx_PyFastCFunction_Check(func)\
604  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
605 #else
606 #define __Pyx_PyFastCFunction_Check(func) 0
607 #endif
608 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
609  #define PyObject_Malloc(s) PyMem_Malloc(s)
610  #define PyObject_Free(p) PyMem_Free(p)
611  #define PyObject_Realloc(p) PyMem_Realloc(p)
612 #endif
613 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
614  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
615  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
616  #define PyMem_RawFree(p) PyMem_Free(p)
617 #endif
618 #if CYTHON_COMPILING_IN_PYSTON
619  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
620  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
621 #else
622  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
623  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
624 #endif
625 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
626  #define __Pyx_PyThreadState_Current PyThreadState_GET()
627 #elif PY_VERSION_HEX >= 0x03060000
628  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
629 #elif PY_VERSION_HEX >= 0x03000000
630  #define __Pyx_PyThreadState_Current PyThreadState_GET()
631 #else
632  #define __Pyx_PyThreadState_Current _PyThreadState_Current
633 #endif
634 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
635 #include "pythread.h"
636 #define Py_tss_NEEDS_INIT 0
637 typedef int Py_tss_t;
638 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
639  *key = PyThread_create_key();
640  return 0;
641 }
642 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
643  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
644  *key = Py_tss_NEEDS_INIT;
645  return key;
646 }
647 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
648  PyObject_Free(key);
649 }
650 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
651  return *key != Py_tss_NEEDS_INIT;
652 }
653 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
654  PyThread_delete_key(*key);
655  *key = Py_tss_NEEDS_INIT;
656 }
657 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
658  return PyThread_set_key_value(*key, value);
659 }
660 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
661  return PyThread_get_key_value(*key);
662 }
663 #endif
664 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
665 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
666 #else
667 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
668 #endif
669 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
670  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
671  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
672 #else
673  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
674  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
675 #endif
676 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
677 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
678 #else
679 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
680 #endif
681 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
682  #define CYTHON_PEP393_ENABLED 1
683  #if PY_VERSION_HEX >= 0x030C0000
684  #define __Pyx_PyUnicode_READY(op) (0)
685  #else
686  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
687  0 : _PyUnicode_Ready((PyObject *)(op)))
688  #endif
689  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
690  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
691  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
692  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
693  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
694  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
695  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
696  #if PY_VERSION_HEX >= 0x030C0000
697  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
698  #else
699  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
700  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
701  #else
702  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
703  #endif
704  #endif
705 #else
706  #define CYTHON_PEP393_ENABLED 0
707  #define PyUnicode_1BYTE_KIND 1
708  #define PyUnicode_2BYTE_KIND 2
709  #define PyUnicode_4BYTE_KIND 4
710  #define __Pyx_PyUnicode_READY(op) (0)
711  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
712  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
713  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
714  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
715  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
716  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
717  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
718  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
719 #endif
720 #if CYTHON_COMPILING_IN_PYPY
721  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
722  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
723 #else
724  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
725  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
726  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
727 #endif
728 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
729  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
730 #endif
731 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
732  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
733 #endif
734 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
735  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
736 #endif
737 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
738 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
739 #if PY_MAJOR_VERSION >= 3
740  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
741 #else
742  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
743 #endif
744 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
745  #define PyObject_ASCII(o) PyObject_Repr(o)
746 #endif
747 #if PY_MAJOR_VERSION >= 3
748  #define PyBaseString_Type PyUnicode_Type
749  #define PyStringObject PyUnicodeObject
750  #define PyString_Type PyUnicode_Type
751  #define PyString_Check PyUnicode_Check
752  #define PyString_CheckExact PyUnicode_CheckExact
753 #ifndef PyObject_Unicode
754  #define PyObject_Unicode PyObject_Str
755 #endif
756 #endif
757 #if PY_MAJOR_VERSION >= 3
758  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
759  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
760 #else
761  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
762  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
763 #endif
764 #ifndef PySet_CheckExact
765  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
766 #endif
767 #if PY_VERSION_HEX >= 0x030900A4
768  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
769  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
770 #else
771  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
772  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
773 #endif
774 #if CYTHON_ASSUME_SAFE_MACROS
775  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
776 #else
777  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
778 #endif
779 #if PY_MAJOR_VERSION >= 3
780  #define PyIntObject PyLongObject
781  #define PyInt_Type PyLong_Type
782  #define PyInt_Check(op) PyLong_Check(op)
783  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
784  #define PyInt_FromString PyLong_FromString
785  #define PyInt_FromUnicode PyLong_FromUnicode
786  #define PyInt_FromLong PyLong_FromLong
787  #define PyInt_FromSize_t PyLong_FromSize_t
788  #define PyInt_FromSsize_t PyLong_FromSsize_t
789  #define PyInt_AsLong PyLong_AsLong
790  #define PyInt_AS_LONG PyLong_AS_LONG
791  #define PyInt_AsSsize_t PyLong_AsSsize_t
792  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
793  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
794  #define PyNumber_Int PyNumber_Long
795 #endif
796 #if PY_MAJOR_VERSION >= 3
797  #define PyBoolObject PyLongObject
798 #endif
799 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
800  #ifndef PyUnicode_InternFromString
801  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
802  #endif
803 #endif
804 #if PY_VERSION_HEX < 0x030200A4
805  typedef long Py_hash_t;
806  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
807  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
808 #else
809  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
810  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
811 #endif
812 #if PY_MAJOR_VERSION >= 3
813  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
814 #else
815  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
816 #endif
817 #if CYTHON_USE_ASYNC_SLOTS
818  #if PY_VERSION_HEX >= 0x030500B1
819  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
820  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
821  #else
822  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
823  #endif
824 #else
825  #define __Pyx_PyType_AsAsync(obj) NULL
826 #endif
827 #ifndef __Pyx_PyAsyncMethodsStruct
828  typedef struct {
829  unaryfunc am_await;
830  unaryfunc am_aiter;
831  unaryfunc am_anext;
832  } __Pyx_PyAsyncMethodsStruct;
833 #endif
834 
835 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
836  #if !defined(_USE_MATH_DEFINES)
837  #define _USE_MATH_DEFINES
838  #endif
839 #endif
840 #include <math.h>
841 #ifdef NAN
842 #define __PYX_NAN() ((float) NAN)
843 #else
844 static CYTHON_INLINE float __PYX_NAN() {
845  float value;
846  memset(&value, 0xFF, sizeof(value));
847  return value;
848 }
849 #endif
850 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
851 #define __Pyx_truncl trunc
852 #else
853 #define __Pyx_truncl truncl
854 #endif
855 
856 #define __PYX_MARK_ERR_POS(f_index, lineno) \
857  { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
858 #define __PYX_ERR(f_index, lineno, Ln_error) \
859  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
860 
861 #ifndef __PYX_EXTERN_C
862  #ifdef __cplusplus
863  #define __PYX_EXTERN_C extern "C"
864  #else
865  #define __PYX_EXTERN_C extern
866  #endif
867 #endif
868 
869 #define __PYX_HAVE__imate___c_linear_operator__py_c_linear_operator
870 #define __PYX_HAVE_API__imate___c_linear_operator__py_c_linear_operator
871 /* Early includes */
872 #include "./definitions.h"
873 #include "ios"
874 #include "new"
875 #include "stdexcept"
876 #include "typeinfo"
877 #include "c_linear_operator.h"
878 #include <string.h>
879 #include <stdlib.h>
880 #include "pythread.h"
881 #include <stdio.h>
882 #include "pystate.h"
883 #ifdef _OPENMP
884 #include <omp.h>
885 #endif /* _OPENMP */
886 
887 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
888 #define CYTHON_WITHOUT_ASSERTIONS
889 #endif
890 
891 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
892  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
893 
894 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
895 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
896 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
897 #define __PYX_DEFAULT_STRING_ENCODING ""
898 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
899 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
900 #define __Pyx_uchar_cast(c) ((unsigned char)c)
901 #define __Pyx_long_cast(x) ((long)x)
902 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
903  (sizeof(type) < sizeof(Py_ssize_t)) ||\
904  (sizeof(type) > sizeof(Py_ssize_t) &&\
905  likely(v < (type)PY_SSIZE_T_MAX ||\
906  v == (type)PY_SSIZE_T_MAX) &&\
907  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
908  v == (type)PY_SSIZE_T_MIN))) ||\
909  (sizeof(type) == sizeof(Py_ssize_t) &&\
910  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
911  v == (type)PY_SSIZE_T_MAX))) )
912 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
913  return (size_t) i < (size_t) limit;
914 }
915 #if defined (__cplusplus) && __cplusplus >= 201103L
916  #include <cstdlib>
917  #define __Pyx_sst_abs(value) std::abs(value)
918 #elif SIZEOF_INT >= SIZEOF_SIZE_T
919  #define __Pyx_sst_abs(value) abs(value)
920 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
921  #define __Pyx_sst_abs(value) labs(value)
922 #elif defined (_MSC_VER)
923  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
924 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
925  #define __Pyx_sst_abs(value) llabs(value)
926 #elif defined (__GNUC__)
927  #define __Pyx_sst_abs(value) __builtin_llabs(value)
928 #else
929  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
930 #endif
931 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
932 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
933 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
934 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
935 #define __Pyx_PyBytes_FromString PyBytes_FromString
936 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
937 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
938 #if PY_MAJOR_VERSION < 3
939  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
940  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
941 #else
942  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
943  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
944 #endif
945 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
946 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
947 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
948 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
949 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
950 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
951 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
952 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
953 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
954 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
955 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
956 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
957 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
958 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
959 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
960 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
961 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
962  const Py_UNICODE *u_end = u;
963  while (*u_end++) ;
964  return (size_t)(u_end - u - 1);
965 }
966 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
967 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
968 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
969 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
970 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
971 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
972 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
973 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
974 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
975 #define __Pyx_PySequence_Tuple(obj)\
976  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
977 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
978 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
979 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
980 #if CYTHON_ASSUME_SAFE_MACROS
981 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
982 #else
983 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
984 #endif
985 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
986 #if PY_MAJOR_VERSION >= 3
987 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
988 #else
989 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
990 #endif
991 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
992 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
993 static int __Pyx_sys_getdefaultencoding_not_ascii;
994 static int __Pyx_init_sys_getdefaultencoding_params(void) {
995  PyObject* sys;
996  PyObject* default_encoding = NULL;
997  PyObject* ascii_chars_u = NULL;
998  PyObject* ascii_chars_b = NULL;
999  const char* default_encoding_c;
1000  sys = PyImport_ImportModule("sys");
1001  if (!sys) goto bad;
1002  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
1003  Py_DECREF(sys);
1004  if (!default_encoding) goto bad;
1005  default_encoding_c = PyBytes_AsString(default_encoding);
1006  if (!default_encoding_c) goto bad;
1007  if (strcmp(default_encoding_c, "ascii") == 0) {
1008  __Pyx_sys_getdefaultencoding_not_ascii = 0;
1009  } else {
1010  char ascii_chars[128];
1011  int c;
1012  for (c = 0; c < 128; c++) {
1013  ascii_chars[c] = c;
1014  }
1015  __Pyx_sys_getdefaultencoding_not_ascii = 1;
1016  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
1017  if (!ascii_chars_u) goto bad;
1018  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
1019  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
1020  PyErr_Format(
1021  PyExc_ValueError,
1022  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
1023  default_encoding_c);
1024  goto bad;
1025  }
1026  Py_DECREF(ascii_chars_u);
1027  Py_DECREF(ascii_chars_b);
1028  }
1029  Py_DECREF(default_encoding);
1030  return 0;
1031 bad:
1032  Py_XDECREF(default_encoding);
1033  Py_XDECREF(ascii_chars_u);
1034  Py_XDECREF(ascii_chars_b);
1035  return -1;
1036 }
1037 #endif
1038 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
1039 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1040 #else
1041 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1042 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
1043 static char* __PYX_DEFAULT_STRING_ENCODING;
1044 static int __Pyx_init_sys_getdefaultencoding_params(void) {
1045  PyObject* sys;
1046  PyObject* default_encoding = NULL;
1047  char* default_encoding_c;
1048  sys = PyImport_ImportModule("sys");
1049  if (!sys) goto bad;
1050  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
1051  Py_DECREF(sys);
1052  if (!default_encoding) goto bad;
1053  default_encoding_c = PyBytes_AsString(default_encoding);
1054  if (!default_encoding_c) goto bad;
1055  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
1056  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
1057  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
1058  Py_DECREF(default_encoding);
1059  return 0;
1060 bad:
1061  Py_XDECREF(default_encoding);
1062  return -1;
1063 }
1064 #endif
1065 #endif
1066 
1067 
1068 /* Test for GCC > 2.95 */
1069 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1070  #define likely(x) __builtin_expect(!!(x), 1)
1071  #define unlikely(x) __builtin_expect(!!(x), 0)
1072 #else /* !__GNUC__ or GCC < 2.95 */
1073  #define likely(x) (x)
1074  #define unlikely(x) (x)
1075 #endif /* __GNUC__ */
1076 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
1077 
1078 static PyObject *__pyx_m = NULL;
1079 static PyObject *__pyx_d;
1080 static PyObject *__pyx_b;
1081 static PyObject *__pyx_cython_runtime = NULL;
1082 static PyObject *__pyx_empty_tuple;
1083 static PyObject *__pyx_empty_bytes;
1084 static PyObject *__pyx_empty_unicode;
1085 static int __pyx_lineno;
1086 static int __pyx_clineno = 0;
1087 static const char * __pyx_cfilenm= __FILE__;
1088 static const char *__pyx_filename;
1089 
1090 
1091 static const char *__pyx_f[] = {
1092  "imate/_c_linear_operator/py_c_linear_operator.pyx",
1093  "stringsource",
1094 };
1095 /* MemviewSliceStruct.proto */
1096 struct __pyx_memoryview_obj;
1097 typedef struct {
1098  struct __pyx_memoryview_obj *memview;
1099  char *data;
1100  Py_ssize_t shape[8];
1101  Py_ssize_t strides[8];
1102  Py_ssize_t suboffsets[8];
1103 } __Pyx_memviewslice;
1104 #define __Pyx_MemoryView_Len(m) (m.shape[0])
1105 
1106 /* Atomics.proto */
1107 #include <pythread.h>
1108 #ifndef CYTHON_ATOMICS
1109  #define CYTHON_ATOMICS 1
1110 #endif
1111 #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
1112 #define __pyx_atomic_int_type int
1113 #if CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
1114  (__GNUC_MINOR__ > 1 ||\
1115  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
1116  #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1)
1117  #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1)
1118  #ifdef __PYX_DEBUG_ATOMICS
1119  #warning "Using GNU atomics"
1120  #endif
1121 #elif CYTHON_ATOMICS && defined(_MSC_VER) && CYTHON_COMPILING_IN_NOGIL
1122  #include <intrin.h>
1123  #undef __pyx_atomic_int_type
1124  #define __pyx_atomic_int_type long
1125  #pragma intrinsic (_InterlockedExchangeAdd)
1126  #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1)
1127  #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1)
1128  #ifdef __PYX_DEBUG_ATOMICS
1129  #pragma message ("Using MSVC atomics")
1130  #endif
1131 #else
1132  #undef CYTHON_ATOMICS
1133  #define CYTHON_ATOMICS 0
1134  #ifdef __PYX_DEBUG_ATOMICS
1135  #warning "Not using atomics"
1136  #endif
1137 #endif
1138 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1139 #if CYTHON_ATOMICS
1140  #define __pyx_add_acquisition_count(memview)\
1141  __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview))
1142  #define __pyx_sub_acquisition_count(memview)\
1143  __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview))
1144 #else
1145  #define __pyx_add_acquisition_count(memview)\
1146  __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1147  #define __pyx_sub_acquisition_count(memview)\
1148  __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1149 #endif
1150 
1151 /* ForceInitThreads.proto */
1152 #ifndef __PYX_FORCE_INIT_THREADS
1153  #define __PYX_FORCE_INIT_THREADS 0
1154 #endif
1155 
1156 /* NoFastGil.proto */
1157 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
1158 #define __Pyx_PyGILState_Release PyGILState_Release
1159 #define __Pyx_FastGIL_Remember()
1160 #define __Pyx_FastGIL_Forget()
1161 #define __Pyx_FastGilFuncInit()
1162 
1163 /* BufferFormatStructs.proto */
1164 #define IS_UNSIGNED(type) (((type) -1) > 0)
1165 struct __Pyx_StructField_;
1166 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
1167 typedef struct {
1168  const char* name;
1169  struct __Pyx_StructField_* fields;
1170  size_t size;
1171  size_t arraysize[8];
1172  int ndim;
1173  char typegroup;
1174  char is_unsigned;
1175  int flags;
1176 } __Pyx_TypeInfo;
1177 typedef struct __Pyx_StructField_ {
1178  __Pyx_TypeInfo* type;
1179  const char* name;
1180  size_t offset;
1181 } __Pyx_StructField;
1182 typedef struct {
1183  __Pyx_StructField* field;
1184  size_t parent_offset;
1185 } __Pyx_BufFmt_StackElem;
1186 typedef struct {
1187  __Pyx_StructField root;
1188  __Pyx_BufFmt_StackElem* head;
1189  size_t fmt_offset;
1190  size_t new_count, enc_count;
1191  size_t struct_alignment;
1192  int is_complex;
1193  char enc_type;
1194  char new_packmode;
1195  char enc_packmode;
1196  char is_valid_array;
1197 } __Pyx_BufFmt_Context;
1198 
1199 
1200 /* "_definitions/types.pxd":110
1201  *
1202  * # Used for indices of small matrices, or small size iterators
1203  * ctypedef int IndexType # <<<<<<<<<<<<<<
1204  * ctypedef int[:] MemoryViewIndexType
1205  *
1206  */
1207 typedef int __pyx_t_5imate_12_definitions_5types_IndexType;
1208 
1209 /* "_definitions/types.pxd":114
1210  *
1211  * # Used for both flags and integers used as signals, including negative integers
1212  * ctypedef int FlagType # <<<<<<<<<<<<<<
1213  * ctypedef int[:] MemoryViewFlagType
1214  *
1215  */
1216 typedef int __pyx_t_5imate_12_definitions_5types_FlagType;
1217 
1218 /*--- Type declarations ---*/
1219 struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
1220 struct __pyx_array_obj;
1221 struct __pyx_MemviewEnum_obj;
1222 struct __pyx_memoryview_obj;
1223 struct __pyx_memoryviewslice_obj;
1224 
1225 /* "_definitions/types.pxd":107
1226  * ctypedef unsigned int[:] MemoryViewLongIndexType
1227  * ELSE:
1228  * ctypedef int[:] MemoryViewLongIndexType # <<<<<<<<<<<<<<
1229  *
1230  * # Used for indices of small matrices, or small size iterators
1231  */
1232 typedef __Pyx_memviewslice __pyx_t_5imate_12_definitions_5types_MemoryViewLongIndexType;
1233 
1234 /* "_definitions/types.pxd":111
1235  * # Used for indices of small matrices, or small size iterators
1236  * ctypedef int IndexType
1237  * ctypedef int[:] MemoryViewIndexType # <<<<<<<<<<<<<<
1238  *
1239  * # Used for both flags and integers used as signals, including negative integers
1240  */
1241 typedef __Pyx_memviewslice __pyx_t_5imate_12_definitions_5types_MemoryViewIndexType;
1242 
1243 /* "_definitions/types.pxd":115
1244  * # Used for both flags and integers used as signals, including negative integers
1245  * ctypedef int FlagType
1246  * ctypedef int[:] MemoryViewFlagType # <<<<<<<<<<<<<<
1247  *
1248  *
1249  */
1250 typedef __Pyx_memviewslice __pyx_t_5imate_12_definitions_5types_MemoryViewFlagType;
1251 
1252 /* "_definitions/types.pxd":122
1253  * # ==============
1254  *
1255  * ctypedef double (*kernel_type)( # noqa: E211 # <<<<<<<<<<<<<<
1256  * const double x,
1257  * const double kernel_param) nogil
1258  */
1259 typedef double (*__pyx_t_5imate_12_definitions_5types_kernel_type)(double const , double const );
1260 
1261 /* "imate/_c_linear_operator/py_c_linear_operator.pxd":23
1262  * # ===================
1263  *
1264  * cdef class pycLinearOperator(object): # <<<<<<<<<<<<<<
1265  *
1266  * # Attributes
1267  */
1268 struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator {
1269  PyObject_HEAD
1270  struct __pyx_vtabstruct_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_vtab;
1271  cLinearOperator<float> *Aop_float;
1272  cLinearOperator<double> *Aop_double;
1273  cLinearOperator<long double> *Aop_long_double;
1274  char *data_type_name;
1275  char *long_index_type_name;
1276  __pyx_t_5imate_12_definitions_5types_IndexType num_parameters;
1277  PyObject *parameters;
1278 };
1279 
1280 
1281 /* "View.MemoryView":106
1282  *
1283  * @cname("__pyx_array")
1284  * cdef class array: # <<<<<<<<<<<<<<
1285  *
1286  * cdef:
1287  */
1288 struct __pyx_array_obj {
1289  PyObject_HEAD
1290  struct __pyx_vtabstruct_array *__pyx_vtab;
1291  char *data;
1292  Py_ssize_t len;
1293  char *format;
1294  int ndim;
1295  Py_ssize_t *_shape;
1296  Py_ssize_t *_strides;
1297  Py_ssize_t itemsize;
1298  PyObject *mode;
1299  PyObject *_format;
1300  void (*callback_free_data)(void *);
1301  int free_data;
1302  int dtype_is_object;
1303 };
1304 
1305 
1306 /* "View.MemoryView":280
1307  *
1308  * @cname('__pyx_MemviewEnum')
1309  * cdef class Enum(object): # <<<<<<<<<<<<<<
1310  * cdef object name
1311  * def __init__(self, name):
1312  */
1313 struct __pyx_MemviewEnum_obj {
1314  PyObject_HEAD
1315  PyObject *name;
1316 };
1317 
1318 
1319 /* "View.MemoryView":331
1320  *
1321  * @cname('__pyx_memoryview')
1322  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1323  *
1324  * cdef object obj
1325  */
1326 struct __pyx_memoryview_obj {
1327  PyObject_HEAD
1328  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1329  PyObject *obj;
1330  PyObject *_size;
1331  PyObject *_array_interface;
1332  PyThread_type_lock lock;
1333  __pyx_atomic_int acquisition_count[2];
1334  __pyx_atomic_int *acquisition_count_aligned_p;
1335  Py_buffer view;
1336  int flags;
1337  int dtype_is_object;
1338  __Pyx_TypeInfo *typeinfo;
1339 };
1340 
1341 
1342 /* "View.MemoryView":967
1343  *
1344  * @cname('__pyx_memoryviewslice')
1345  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1346  * "Internal class for passing memoryview slices to Python"
1347  *
1348  */
1349 struct __pyx_memoryviewslice_obj {
1350  struct __pyx_memoryview_obj __pyx_base;
1351  __Pyx_memviewslice from_slice;
1352  PyObject *from_object;
1353  PyObject *(*to_object_func)(char *);
1354  int (*to_dtype_func)(char *, PyObject *);
1355 };
1356 
1357 
1358 
1359 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":26
1360  * # ===================
1361  *
1362  * cdef class pycLinearOperator(object): # <<<<<<<<<<<<<<
1363  * """
1364  * """
1365  */
1366 
1367 struct __pyx_vtabstruct_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator {
1368  LongIndexType (*get_num_rows)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *);
1369  LongIndexType (*get_num_columns)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *);
1370  cLinearOperator<float> *(*get_linear_operator_float)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *);
1371  cLinearOperator<double> *(*get_linear_operator_double)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *);
1372  cLinearOperator<long double> *(*get_linear_operator_long_double)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *);
1373  void (*dot)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *, PyObject *, PyObject *, int __pyx_skip_dispatch);
1374  void (*transpose_dot)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *, PyObject *, PyObject *, int __pyx_skip_dispatch);
1375 };
1376 static struct __pyx_vtabstruct_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_vtabptr_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
1377 
1378 
1379 /* "View.MemoryView":106
1380  *
1381  * @cname("__pyx_array")
1382  * cdef class array: # <<<<<<<<<<<<<<
1383  *
1384  * cdef:
1385  */
1386 
1387 struct __pyx_vtabstruct_array {
1388  PyObject *(*get_memview)(struct __pyx_array_obj *);
1389 };
1390 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1391 
1392 
1393 /* "View.MemoryView":331
1394  *
1395  * @cname('__pyx_memoryview')
1396  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1397  *
1398  * cdef object obj
1399  */
1400 
1401 struct __pyx_vtabstruct_memoryview {
1402  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
1403  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
1404  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1405  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
1406  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1407  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
1408  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
1409 };
1410 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1411 
1412 
1413 /* "View.MemoryView":967
1414  *
1415  * @cname('__pyx_memoryviewslice')
1416  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1417  * "Internal class for passing memoryview slices to Python"
1418  *
1419  */
1420 
1421 struct __pyx_vtabstruct__memoryviewslice {
1422  struct __pyx_vtabstruct_memoryview __pyx_base;
1423 };
1424 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1425 
1426 /* --- Runtime support code (head) --- */
1427 /* Refnanny.proto */
1428 #ifndef CYTHON_REFNANNY
1429  #define CYTHON_REFNANNY 0
1430 #endif
1431 #if CYTHON_REFNANNY
1432  typedef struct {
1433  void (*INCREF)(void*, PyObject*, int);
1434  void (*DECREF)(void*, PyObject*, int);
1435  void (*GOTREF)(void*, PyObject*, int);
1436  void (*GIVEREF)(void*, PyObject*, int);
1437  void* (*SetupContext)(const char*, int, const char*);
1438  void (*FinishContext)(void**);
1439  } __Pyx_RefNannyAPIStruct;
1440  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1441  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1442  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1443 #ifdef WITH_THREAD
1444  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1445  if (acquire_gil) {\
1446  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1447  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1448  PyGILState_Release(__pyx_gilstate_save);\
1449  } else {\
1450  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1451  }
1452 #else
1453  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1454  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1455 #endif
1456  #define __Pyx_RefNannyFinishContext()\
1457  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1458  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1459  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1460  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1461  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1462  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1463  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1464  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1465  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1466 #else
1467  #define __Pyx_RefNannyDeclarations
1468  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1469  #define __Pyx_RefNannyFinishContext()
1470  #define __Pyx_INCREF(r) Py_INCREF(r)
1471  #define __Pyx_DECREF(r) Py_DECREF(r)
1472  #define __Pyx_GOTREF(r)
1473  #define __Pyx_GIVEREF(r)
1474  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1475  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1476  #define __Pyx_XGOTREF(r)
1477  #define __Pyx_XGIVEREF(r)
1478 #endif
1479 #define __Pyx_XDECREF_SET(r, v) do {\
1480  PyObject *tmp = (PyObject *) r;\
1481  r = v; __Pyx_XDECREF(tmp);\
1482  } while (0)
1483 #define __Pyx_DECREF_SET(r, v) do {\
1484  PyObject *tmp = (PyObject *) r;\
1485  r = v; __Pyx_DECREF(tmp);\
1486  } while (0)
1487 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1488 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1489 
1490 /* PyObjectGetAttrStr.proto */
1491 #if CYTHON_USE_TYPE_SLOTS
1492 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1493 #else
1494 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1495 #endif
1496 
1497 /* GetBuiltinName.proto */
1498 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1499 
1500 /* RaiseArgTupleInvalid.proto */
1501 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1502  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1503 
1504 /* KeywordStringCheck.proto */
1505 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1506 
1507 /* PyThreadStateGet.proto */
1508 #if CYTHON_FAST_THREAD_STATE
1509 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1510 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1511 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1512 #else
1513 #define __Pyx_PyThreadState_declare
1514 #define __Pyx_PyThreadState_assign
1515 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1516 #endif
1517 
1518 /* PyErrFetchRestore.proto */
1519 #if CYTHON_FAST_THREAD_STATE
1520 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1521 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1522 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1523 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1524 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1525 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1526 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1527 #if CYTHON_COMPILING_IN_CPYTHON
1528 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1529 #else
1530 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1531 #endif
1532 #else
1533 #define __Pyx_PyErr_Clear() PyErr_Clear()
1534 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1535 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1536 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1537 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1538 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1539 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1540 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1541 #endif
1542 
1543 /* Profile.proto */
1544 #ifndef CYTHON_PROFILE
1545 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
1546  #define CYTHON_PROFILE 0
1547 #else
1548  #define CYTHON_PROFILE 1
1549 #endif
1550 #endif
1551 #ifndef CYTHON_TRACE_NOGIL
1552  #define CYTHON_TRACE_NOGIL 0
1553 #else
1554  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
1555  #define CYTHON_TRACE 1
1556  #endif
1557 #endif
1558 #ifndef CYTHON_TRACE
1559  #define CYTHON_TRACE 0
1560 #endif
1561 #if CYTHON_TRACE
1562  #undef CYTHON_PROFILE_REUSE_FRAME
1563 #endif
1564 #ifndef CYTHON_PROFILE_REUSE_FRAME
1565  #define CYTHON_PROFILE_REUSE_FRAME 0
1566 #endif
1567 #if CYTHON_PROFILE || CYTHON_TRACE
1568  #include "compile.h"
1569  #include "frameobject.h"
1570  #include "traceback.h"
1571 #if PY_VERSION_HEX >= 0x030b00a6
1572  #ifndef Py_BUILD_CORE
1573  #define Py_BUILD_CORE 1
1574  #endif
1575  #include "internal/pycore_frame.h"
1576 #endif
1577  #if CYTHON_PROFILE_REUSE_FRAME
1578  #define CYTHON_FRAME_MODIFIER static
1579  #define CYTHON_FRAME_DEL(frame)
1580  #else
1581  #define CYTHON_FRAME_MODIFIER
1582  #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
1583  #endif
1584  #define __Pyx_TraceDeclarations\
1585  static PyCodeObject *__pyx_frame_code = NULL;\
1586  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
1587  int __Pyx_use_tracing = 0;
1588  #define __Pyx_TraceFrameInit(codeobj)\
1589  if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
1590 #if PY_VERSION_HEX >= 0x030b00a2
1591  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1592  (unlikely((tstate)->cframe->use_tracing) &&\
1593  (!(check_tracing) || !(tstate)->tracing) &&\
1594  (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1595  #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
1596  #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
1597 #elif PY_VERSION_HEX >= 0x030a00b1
1598  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1599  (unlikely((tstate)->cframe->use_tracing) &&\
1600  (!(check_tracing) || !(tstate)->tracing) &&\
1601  (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1602  #define __Pyx_EnterTracing(tstate)\
1603  do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
1604  #define __Pyx_LeaveTracing(tstate)\
1605  do {\
1606  tstate->tracing--;\
1607  tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
1608  || tstate->c_profilefunc != NULL);\
1609  } while (0)
1610 #else
1611  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1612  (unlikely((tstate)->use_tracing) &&\
1613  (!(check_tracing) || !(tstate)->tracing) &&\
1614  (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1615  #define __Pyx_EnterTracing(tstate)\
1616  do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
1617  #define __Pyx_LeaveTracing(tstate)\
1618  do {\
1619  tstate->tracing--;\
1620  tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
1621  || tstate->c_profilefunc != NULL);\
1622  } while (0)
1623 #endif
1624  #ifdef WITH_THREAD
1625  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
1626  if (nogil) {\
1627  if (CYTHON_TRACE_NOGIL) {\
1628  PyThreadState *tstate;\
1629  PyGILState_STATE state = PyGILState_Ensure();\
1630  tstate = __Pyx_PyThreadState_Current;\
1631  if (__Pyx_IsTracing(tstate, 1, 1)) {\
1632  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
1633  }\
1634  PyGILState_Release(state);\
1635  if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1636  }\
1637  } else {\
1638  PyThreadState* tstate = PyThreadState_GET();\
1639  if (__Pyx_IsTracing(tstate, 1, 1)) {\
1640  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
1641  if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1642  }\
1643  }
1644  #else
1645  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
1646  { PyThreadState* tstate = PyThreadState_GET();\
1647  if (__Pyx_IsTracing(tstate, 1, 1)) {\
1648  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
1649  if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1650  }\
1651  }
1652  #endif
1653  #define __Pyx_TraceException()\
1654  if (likely(!__Pyx_use_tracing)); else {\
1655  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1656  if (__Pyx_IsTracing(tstate, 0, 1)) {\
1657  __Pyx_EnterTracing(tstate);\
1658  PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
1659  if (exc_info) {\
1660  if (CYTHON_TRACE && tstate->c_tracefunc)\
1661  tstate->c_tracefunc(\
1662  tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
1663  tstate->c_profilefunc(\
1664  tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
1665  Py_DECREF(exc_info);\
1666  }\
1667  __Pyx_LeaveTracing(tstate);\
1668  }\
1669  }
1670  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
1671  PyObject *type, *value, *traceback;
1672  __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
1673  __Pyx_EnterTracing(tstate);
1674  if (CYTHON_TRACE && tstate->c_tracefunc)
1675  tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
1676  if (tstate->c_profilefunc)
1677  tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
1678  CYTHON_FRAME_DEL(frame);
1679  __Pyx_LeaveTracing(tstate);
1680  __Pyx_ErrRestoreInState(tstate, type, value, traceback);
1681  }
1682  #ifdef WITH_THREAD
1683  #define __Pyx_TraceReturn(result, nogil)\
1684  if (likely(!__Pyx_use_tracing)); else {\
1685  if (nogil) {\
1686  if (CYTHON_TRACE_NOGIL) {\
1687  PyThreadState *tstate;\
1688  PyGILState_STATE state = PyGILState_Ensure();\
1689  tstate = __Pyx_PyThreadState_Current;\
1690  if (__Pyx_IsTracing(tstate, 0, 0)) {\
1691  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
1692  }\
1693  PyGILState_Release(state);\
1694  }\
1695  } else {\
1696  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1697  if (__Pyx_IsTracing(tstate, 0, 0)) {\
1698  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
1699  }\
1700  }\
1701  }
1702  #else
1703  #define __Pyx_TraceReturn(result, nogil)\
1704  if (likely(!__Pyx_use_tracing)); else {\
1705  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1706  if (__Pyx_IsTracing(tstate, 0, 0)) {\
1707  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
1708  }\
1709  }
1710  #endif
1711  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
1712  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
1713 #else
1714  #define __Pyx_TraceDeclarations
1715  #define __Pyx_TraceFrameInit(codeobj)
1716  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error;
1717  #define __Pyx_TraceException()
1718  #define __Pyx_TraceReturn(result, nogil)
1719 #endif
1720 #if CYTHON_TRACE
1721  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
1722  int ret;
1723  PyObject *type, *value, *traceback;
1724  __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
1725  __Pyx_PyFrame_SetLineNumber(frame, lineno);
1726  __Pyx_EnterTracing(tstate);
1727  ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
1728  __Pyx_LeaveTracing(tstate);
1729  if (likely(!ret)) {
1730  __Pyx_ErrRestoreInState(tstate, type, value, traceback);
1731  } else {
1732  Py_XDECREF(type);
1733  Py_XDECREF(value);
1734  Py_XDECREF(traceback);
1735  }
1736  return ret;
1737  }
1738  #ifdef WITH_THREAD
1739  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
1740  if (likely(!__Pyx_use_tracing)); else {\
1741  if (nogil) {\
1742  if (CYTHON_TRACE_NOGIL) {\
1743  int ret = 0;\
1744  PyThreadState *tstate;\
1745  PyGILState_STATE state = PyGILState_Ensure();\
1746  tstate = __Pyx_PyThreadState_Current;\
1747  if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
1748  ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
1749  }\
1750  PyGILState_Release(state);\
1751  if (unlikely(ret)) goto_error;\
1752  }\
1753  } else {\
1754  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1755  if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
1756  int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
1757  if (unlikely(ret)) goto_error;\
1758  }\
1759  }\
1760  }
1761  #else
1762  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
1763  if (likely(!__Pyx_use_tracing)); else {\
1764  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1765  if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
1766  int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
1767  if (unlikely(ret)) goto_error;\
1768  }\
1769  }
1770  #endif
1771 #else
1772  #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error;
1773 #endif
1774 
1775 /* PyObjectCall.proto */
1776 #if CYTHON_COMPILING_IN_CPYTHON
1777 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1778 #else
1779 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1780 #endif
1781 
1782 /* RaiseException.proto */
1783 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1784 
1785 /* WriteUnraisableException.proto */
1786 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1787  int lineno, const char *filename,
1788  int full_traceback, int nogil);
1789 
1790 /* IncludeStringH.proto */
1791 #include <string.h>
1792 
1793 /* BytesEquals.proto */
1794 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1795 
1796 /* PyCFunctionFastCall.proto */
1797 #if CYTHON_FAST_PYCCALL
1798 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1799 #else
1800 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1801 #endif
1802 
1803 /* PyFunctionFastCall.proto */
1804 #if CYTHON_FAST_PYCALL
1805 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1806  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1807 #if 1 || PY_VERSION_HEX < 0x030600B1
1808 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1809 #else
1810 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1811 #endif
1812 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1813  (sizeof(char [1 - 2*!(cond)]) - 1)
1814 #ifndef Py_MEMBER_SIZE
1815 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1816 #endif
1817 #if CYTHON_FAST_PYCALL
1818  static size_t __pyx_pyframe_localsplus_offset = 0;
1819  #include "frameobject.h"
1820 #if PY_VERSION_HEX >= 0x030b00a6
1821  #ifndef Py_BUILD_CORE
1822  #define Py_BUILD_CORE 1
1823  #endif
1824  #include "internal/pycore_frame.h"
1825 #endif
1826  #define __Pxy_PyFrame_Initialize_Offsets()\
1827  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1828  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1829  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1830  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1831 #endif // CYTHON_FAST_PYCALL
1832 #endif
1833 
1834 /* PyObjectCallMethO.proto */
1835 #if CYTHON_COMPILING_IN_CPYTHON
1836 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1837 #endif
1838 
1839 /* PyObjectCallOneArg.proto */
1840 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1841 
1842 /* PyDictVersioning.proto */
1843 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1844 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1845 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1846 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1847  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1848  (cache_var) = (value);
1849 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1850  static PY_UINT64_T __pyx_dict_version = 0;\
1851  static PyObject *__pyx_dict_cached_value = NULL;\
1852  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1853  (VAR) = __pyx_dict_cached_value;\
1854  } else {\
1855  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1856  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1857  }\
1858 }
1859 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1860 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1861 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1862 #else
1863 #define __PYX_GET_DICT_VERSION(dict) (0)
1864 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1865 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1866 #endif
1867 
1868 /* GetModuleGlobalName.proto */
1869 #if CYTHON_USE_DICT_VERSIONS
1870 #define __Pyx_GetModuleGlobalName(var, name) do {\
1871  static PY_UINT64_T __pyx_dict_version = 0;\
1872  static PyObject *__pyx_dict_cached_value = NULL;\
1873  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1874  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1875  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1876 } while(0)
1877 #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
1878  PY_UINT64_T __pyx_dict_version;\
1879  PyObject *__pyx_dict_cached_value;\
1880  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1881 } while(0)
1882 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1883 #else
1884 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1885 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1886 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1887 #endif
1888 
1889 /* PyObjectCall2Args.proto */
1890 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1891 
1892 /* UnicodeEquals.proto */
1893 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1894 
1895 /* MemviewSliceInit.proto */
1896 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
1897 #define __Pyx_MEMVIEW_DIRECT 1
1898 #define __Pyx_MEMVIEW_PTR 2
1899 #define __Pyx_MEMVIEW_FULL 4
1900 #define __Pyx_MEMVIEW_CONTIG 8
1901 #define __Pyx_MEMVIEW_STRIDED 16
1902 #define __Pyx_MEMVIEW_FOLLOW 32
1903 #define __Pyx_IS_C_CONTIG 1
1904 #define __Pyx_IS_F_CONTIG 2
1905 static int __Pyx_init_memviewslice(
1906  struct __pyx_memoryview_obj *memview,
1907  int ndim,
1908  __Pyx_memviewslice *memviewslice,
1909  int memview_is_new_reference);
1910 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
1911  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
1912 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
1913  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
1914 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
1915 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
1916 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
1917 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
1918 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
1919 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
1920 
1921 /* RaiseDoubleKeywords.proto */
1922 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1923 
1924 /* ParseKeywords.proto */
1925 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1926  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1927  const char* function_name);
1928 
1929 /* ArgTypeTest.proto */
1930 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1931  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1932  __Pyx__ArgTypeTest(obj, type, name, exact))
1933 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1934 
1935 /* StrEquals.proto */
1936 #if PY_MAJOR_VERSION >= 3
1937 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1938 #else
1939 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1940 #endif
1941 
1942 /* UnaryNegOverflows.proto */
1943 #define UNARY_NEG_WOULD_OVERFLOW(x)\
1944  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
1945 
1946 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1947 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
1948 /* GetAttr.proto */
1949 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1950 
1951 /* GetItemInt.proto */
1952 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1953  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1954  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1955  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1956  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1957 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1958  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1959  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1960  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1961 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1962  int wraparound, int boundscheck);
1963 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1964  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1965  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1966  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1967 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1968  int wraparound, int boundscheck);
1969 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1970 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1971  int is_list, int wraparound, int boundscheck);
1972 
1973 /* ObjectGetItem.proto */
1974 #if CYTHON_USE_TYPE_SLOTS
1975 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1976 #else
1977 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1978 #endif
1979 
1980 /* decode_c_string_utf16.proto */
1981 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1982  int byteorder = 0;
1983  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1984 }
1985 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1986  int byteorder = -1;
1987  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1988 }
1989 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1990  int byteorder = 1;
1991  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1992 }
1993 
1994 /* decode_c_string.proto */
1995 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
1996  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
1997  const char* encoding, const char* errors,
1998  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1999 
2000 /* PyErrExceptionMatches.proto */
2001 #if CYTHON_FAST_THREAD_STATE
2002 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2003 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2004 #else
2005 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2006 #endif
2007 
2008 /* GetAttr3.proto */
2009 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2010 
2011 /* RaiseTooManyValuesToUnpack.proto */
2012 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2013 
2014 /* RaiseNeedMoreValuesToUnpack.proto */
2015 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2016 
2017 /* RaiseNoneIterError.proto */
2018 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
2019 
2020 /* ExtTypeTest.proto */
2021 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2022 
2023 /* GetTopmostException.proto */
2024 #if CYTHON_USE_EXC_INFO_STACK
2025 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2026 #endif
2027 
2028 /* SaveResetException.proto */
2029 #if CYTHON_FAST_THREAD_STATE
2030 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2031 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2032 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2033 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2034 #else
2035 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2036 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2037 #endif
2038 
2039 /* GetException.proto */
2040 #if CYTHON_FAST_THREAD_STATE
2041 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2042 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2043 #else
2044 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2045 #endif
2046 
2047 /* SwapException.proto */
2048 #if CYTHON_FAST_THREAD_STATE
2049 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
2050 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2051 #else
2052 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2053 #endif
2054 
2055 /* Import.proto */
2056 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
2057 
2058 /* FastTypeChecks.proto */
2059 #if CYTHON_COMPILING_IN_CPYTHON
2060 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2061 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2062 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2063 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2064 #else
2065 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2066 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2067 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2068 #endif
2069 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2070 
2071 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2072 /* ListCompAppend.proto */
2073 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2074 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
2075  PyListObject* L = (PyListObject*) list;
2076  Py_ssize_t len = Py_SIZE(list);
2077  if (likely(L->allocated > len)) {
2078  Py_INCREF(x);
2079  PyList_SET_ITEM(list, len, x);
2080  __Pyx_SET_SIZE(list, len + 1);
2081  return 0;
2082  }
2083  return PyList_Append(list, x);
2084 }
2085 #else
2086 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
2087 #endif
2088 
2089 /* PyIntBinop.proto */
2090 #if !CYTHON_COMPILING_IN_PYPY
2091 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
2092 #else
2093 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
2094  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2095 #endif
2096 
2097 /* ListExtend.proto */
2098 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
2099 #if CYTHON_COMPILING_IN_CPYTHON
2100  PyObject* none = _PyList_Extend((PyListObject*)L, v);
2101  if (unlikely(!none))
2102  return -1;
2103  Py_DECREF(none);
2104  return 0;
2105 #else
2106  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
2107 #endif
2108 }
2109 
2110 /* ListAppend.proto */
2111 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2112 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
2113  PyListObject* L = (PyListObject*) list;
2114  Py_ssize_t len = Py_SIZE(list);
2115  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
2116  Py_INCREF(x);
2117  PyList_SET_ITEM(list, len, x);
2118  __Pyx_SET_SIZE(list, len + 1);
2119  return 0;
2120  }
2121  return PyList_Append(list, x);
2122 }
2123 #else
2124 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2125 #endif
2126 
2127 /* AssertionsEnabled.proto */
2128 #define __Pyx_init_assertions_enabled()
2129 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
2130  #define __pyx_assertions_enabled() (1)
2131 #elif PY_VERSION_HEX < 0x03080000 || CYTHON_COMPILING_IN_PYPY || defined(Py_LIMITED_API)
2132  #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
2133 #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030900A6
2134  static int __pyx_assertions_enabled_flag;
2135  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
2136  #undef __Pyx_init_assertions_enabled
2137  static void __Pyx_init_assertions_enabled(void) {
2138  __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
2139  }
2140 #else
2141  #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
2142 #endif
2143 
2144 /* None.proto */
2145 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
2146 
2147 /* PySequenceContains.proto */
2148 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
2149  int result = PySequence_Contains(seq, item);
2150  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
2151 }
2152 
2153 /* ImportFrom.proto */
2154 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
2155 
2156 /* HasAttr.proto */
2157 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2158 
2159 /* PyObject_GenericGetAttrNoDict.proto */
2160 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2161 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
2162 #else
2163 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2164 #endif
2165 
2166 /* PyObject_GenericGetAttr.proto */
2167 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2168 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
2169 #else
2170 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2171 #endif
2172 
2173 /* SetVTable.proto */
2174 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
2175 
2176 /* PyObjectGetAttrStrNoError.proto */
2177 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2178 
2179 /* SetupReduce.proto */
2180 static int __Pyx_setup_reduce(PyObject* type_obj);
2181 
2182 /* FetchCommonType.proto */
2183 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
2184 
2185 /* CythonFunctionShared.proto */
2186 #define __Pyx_CyFunction_USED 1
2187 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2188 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2189 #define __Pyx_CYFUNCTION_CCLASS 0x04
2190 #define __Pyx_CyFunction_GetClosure(f)\
2191  (((__pyx_CyFunctionObject *) (f))->func_closure)
2192 #define __Pyx_CyFunction_GetClassObj(f)\
2193  (((__pyx_CyFunctionObject *) (f))->func_classobj)
2194 #define __Pyx_CyFunction_Defaults(type, f)\
2195  ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
2196 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2197  ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
2198 typedef struct {
2199  PyCFunctionObject func;
2200 #if PY_VERSION_HEX < 0x030500A0
2201  PyObject *func_weakreflist;
2202 #endif
2203  PyObject *func_dict;
2204  PyObject *func_name;
2205  PyObject *func_qualname;
2206  PyObject *func_doc;
2207  PyObject *func_globals;
2208  PyObject *func_code;
2209  PyObject *func_closure;
2210  PyObject *func_classobj;
2211  void *defaults;
2212  int defaults_pyobjects;
2213  size_t defaults_size; // used by FusedFunction for copying defaults
2214  int flags;
2215  PyObject *defaults_tuple;
2216  PyObject *defaults_kwdict;
2217  PyObject *(*defaults_getter)(PyObject *);
2218  PyObject *func_annotations;
2219 } __pyx_CyFunctionObject;
2220 static PyTypeObject *__pyx_CyFunctionType = 0;
2221 #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
2222 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
2223  int flags, PyObject* qualname,
2224  PyObject *self,
2225  PyObject *module, PyObject *globals,
2226  PyObject* code);
2227 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
2228  size_t size,
2229  int pyobjects);
2230 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2231  PyObject *tuple);
2232 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2233  PyObject *dict);
2234 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2235  PyObject *dict);
2236 static int __pyx_CyFunction_init(void);
2237 
2238 /* CythonFunction.proto */
2239 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2240  int flags, PyObject* qualname,
2241  PyObject *closure,
2242  PyObject *module, PyObject *globals,
2243  PyObject* code);
2244 
2245 /* CLineInTraceback.proto */
2246 #ifdef CYTHON_CLINE_IN_TRACEBACK
2247 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2248 #else
2249 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2250 #endif
2251 
2252 /* CodeObjectCache.proto */
2253 typedef struct {
2254  PyCodeObject* code_object;
2255  int code_line;
2256 } __Pyx_CodeObjectCacheEntry;
2257 struct __Pyx_CodeObjectCache {
2258  int count;
2259  int max_count;
2260  __Pyx_CodeObjectCacheEntry* entries;
2261 };
2262 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2263 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2264 static PyCodeObject *__pyx_find_code_object(int code_line);
2265 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
2266 
2267 /* AddTraceback.proto */
2268 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2269  int py_line, const char *filename);
2270 
2271 #if PY_MAJOR_VERSION < 3
2272  static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
2273  static void __Pyx_ReleaseBuffer(Py_buffer *view);
2274 #else
2275  #define __Pyx_GetBuffer PyObject_GetBuffer
2276  #define __Pyx_ReleaseBuffer PyBuffer_Release
2277 #endif
2278 
2279 
2280 /* BufferStructDeclare.proto */
2281 typedef struct {
2282  Py_ssize_t shape, strides, suboffsets;
2283 } __Pyx_Buf_DimInfo;
2284 typedef struct {
2285  size_t refcount;
2286  Py_buffer pybuffer;
2287 } __Pyx_Buffer;
2288 typedef struct {
2289  __Pyx_Buffer *rcbuffer;
2290  char *data;
2291  __Pyx_Buf_DimInfo diminfo[8];
2292 } __Pyx_LocalBuf_ND;
2293 
2294 /* MemviewSliceIsContig.proto */
2295 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2296 
2297 /* OverlappingSlices.proto */
2298 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2299  __Pyx_memviewslice *slice2,
2300  int ndim, size_t itemsize);
2301 
2302 /* Capsule.proto */
2303 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2304 
2305 /* GCCDiagnostics.proto */
2306 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2307 #define __Pyx_HAS_GCC_DIAGNOSTIC
2308 #endif
2309 
2310 /* IsLittleEndian.proto */
2311 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
2312 
2313 /* BufferFormatCheck.proto */
2314 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
2315 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
2316  __Pyx_BufFmt_StackElem* stack,
2317  __Pyx_TypeInfo* type);
2318 
2319 /* TypeInfoCompare.proto */
2320 static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
2321 
2322 /* MemviewSliceValidateAndInit.proto */
2323 static int __Pyx_ValidateAndInit_memviewslice(
2324  int *axes_specs,
2325  int c_or_f_flag,
2326  int buf_flags,
2327  int ndim,
2328  __Pyx_TypeInfo *dtype,
2329  __Pyx_BufFmt_StackElem stack[],
2330  __Pyx_memviewslice *memviewslice,
2331  PyObject *original_obj);
2332 
2333 /* ObjectToMemviewSlice.proto */
2334 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_float(PyObject *, int writable_flag);
2335 
2336 /* ObjectToMemviewSlice.proto */
2337 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *, int writable_flag);
2338 
2339 /* ObjectToMemviewSlice.proto */
2340 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(PyObject *, int writable_flag);
2341 
2342 /* MemviewSliceCopyTemplate.proto */
2343 static __Pyx_memviewslice
2344 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
2345  const char *mode, int ndim,
2346  size_t sizeof_dtype, int contig_flag,
2347  int dtype_is_object);
2348 
2349 /* CIntToPy.proto */
2350 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2351 
2352 /* CIntFromPy.proto */
2353 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2354 
2355 /* CIntFromPy.proto */
2356 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2357 
2358 /* CIntToPy.proto */
2359 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2360 
2361 /* CIntFromPy.proto */
2362 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2363 
2364 /* CheckBinaryVersion.proto */
2365 static int __Pyx_check_binary_version(void);
2366 
2367 /* InitStrings.proto */
2368 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2369 
2370 static LongIndexType __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_rows(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto*/
2371 static LongIndexType __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_columns(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto*/
2372 static cLinearOperator<float> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_float(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto*/
2373 static cLinearOperator<double> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_double(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto*/
2374 static cLinearOperator<long double> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_long_double(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto*/
2375 static void __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product, int __pyx_skip_dispatch); /* proto*/
2376 static void __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_transpose_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product, int __pyx_skip_dispatch); /* proto*/
2377 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2378 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2379 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2380 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
2381 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
2382 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2383 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2384 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2385 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2386 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2387 
2388 /* Module declarations from 'imate._definitions.types' */
2389 
2390 /* Module declarations from 'imate._c_linear_operator.c_linear_operator' */
2391 
2392 /* Module declarations from 'libc.string' */
2393 
2394 /* Module declarations from 'libc.stdlib' */
2395 
2396 /* Module declarations from 'imate._c_linear_operator.py_c_linear_operator' */
2397 static PyTypeObject *__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator = 0;
2398 static PyTypeObject *__pyx_array_type = 0;
2399 static PyTypeObject *__pyx_MemviewEnum_type = 0;
2400 static PyTypeObject *__pyx_memoryview_type = 0;
2401 static PyTypeObject *__pyx_memoryviewslice_type = 0;
2402 static PyObject *generic = 0;
2403 static PyObject *strided = 0;
2404 static PyObject *indirect = 0;
2405 static PyObject *contiguous = 0;
2406 static PyObject *indirect_contiguous = 0;
2407 static int __pyx_memoryview_thread_locks_used;
2408 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
2409 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2410 static void *__pyx_align_pointer(void *, size_t); /*proto*/
2411 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
2412 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
2413 static PyObject *_unellipsify(PyObject *, int); /*proto*/
2414 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
2415 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
2416 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
2417 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
2418 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
2419 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
2420 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2421 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2422 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
2423 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2424 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
2425 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
2426 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
2427 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
2428 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
2429 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
2430 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
2431 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
2432 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
2433 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
2434 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
2435 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
2436 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
2437 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2438 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2439 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
2440 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
2441 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
2442 static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };
2443 static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
2444 static __Pyx_TypeInfo __Pyx_TypeInfo_long__double = { "long double", NULL, sizeof(long double), { 0 }, 0, 'R', 0, 0 };
2445 #define __Pyx_MODULE_NAME "imate._c_linear_operator.py_c_linear_operator"
2446 extern int __pyx_module_is_main_imate___c_linear_operator__py_c_linear_operator;
2447 int __pyx_module_is_main_imate___c_linear_operator__py_c_linear_operator = 0;
2448 
2449 /* Implementation of 'imate._c_linear_operator.py_c_linear_operator' */
2450 static PyObject *__pyx_builtin_TypeError;
2451 static PyObject *__pyx_builtin_ValueError;
2452 static PyObject *__pyx_builtin_RuntimeError;
2453 static PyObject *__pyx_builtin_MemoryError;
2454 static PyObject *__pyx_builtin_enumerate;
2455 static PyObject *__pyx_builtin_range;
2456 static PyObject *__pyx_builtin_Ellipsis;
2457 static PyObject *__pyx_builtin_id;
2458 static PyObject *__pyx_builtin_IndexError;
2459 static const char __pyx_k_O[] = "O";
2460 static const char __pyx_k_c[] = "c";
2461 static const char __pyx_k_id[] = "id";
2462 static const char __pyx_k_dot[] = "dot";
2463 static const char __pyx_k_new[] = "__new__";
2464 static const char __pyx_k_obj[] = "obj";
2465 static const char __pyx_k_base[] = "base";
2466 static const char __pyx_k_dict[] = "__dict__";
2467 static const char __pyx_k_main[] = "__main__";
2468 static const char __pyx_k_mode[] = "mode";
2469 static const char __pyx_k_name[] = "name";
2470 static const char __pyx_k_ndim[] = "ndim";
2471 static const char __pyx_k_pack[] = "pack";
2472 static const char __pyx_k_self[] = "self";
2473 static const char __pyx_k_size[] = "size";
2474 static const char __pyx_k_step[] = "step";
2475 static const char __pyx_k_stop[] = "stop";
2476 static const char __pyx_k_test[] = "__test__";
2477 static const char __pyx_k_ASCII[] = "ASCII";
2478 static const char __pyx_k_array[] = "array";
2479 static const char __pyx_k_class[] = "__class__";
2480 static const char __pyx_k_dtype[] = "dtype";
2481 static const char __pyx_k_error[] = "error";
2482 static const char __pyx_k_flags[] = "flags";
2483 static const char __pyx_k_numpy[] = "numpy";
2484 static const char __pyx_k_range[] = "range";
2485 static const char __pyx_k_shape[] = "shape";
2486 static const char __pyx_k_start[] = "start";
2487 static const char __pyx_k_astype[] = "astype";
2488 static const char __pyx_k_encode[] = "encode";
2489 static const char __pyx_k_format[] = "format";
2490 static const char __pyx_k_import[] = "__import__";
2491 static const char __pyx_k_name_2[] = "__name__";
2492 static const char __pyx_k_pickle[] = "pickle";
2493 static const char __pyx_k_reduce[] = "__reduce__";
2494 static const char __pyx_k_struct[] = "struct";
2495 static const char __pyx_k_unpack[] = "unpack";
2496 static const char __pyx_k_update[] = "update";
2497 static const char __pyx_k_vector[] = "vector";
2498 static const char __pyx_k_float32[] = "float32";
2499 static const char __pyx_k_float64[] = "float64";
2500 static const char __pyx_k_fortran[] = "fortran";
2501 static const char __pyx_k_memview[] = "memview";
2502 static const char __pyx_k_product[] = "product";
2503 static const char __pyx_k_Ellipsis[] = "Ellipsis";
2504 static const char __pyx_k_float128[] = "float128";
2505 static const char __pyx_k_getstate[] = "__getstate__";
2506 static const char __pyx_k_isscalar[] = "isscalar";
2507 static const char __pyx_k_itemsize[] = "itemsize";
2508 static const char __pyx_k_pyx_type[] = "__pyx_type";
2509 static const char __pyx_k_setstate[] = "__setstate__";
2510 static const char __pyx_k_TypeError[] = "TypeError";
2511 static const char __pyx_k_enumerate[] = "enumerate";
2512 static const char __pyx_k_pyx_state[] = "__pyx_state";
2513 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2514 static const char __pyx_k_IndexError[] = "IndexError";
2515 static const char __pyx_k_ValueError[] = "ValueError";
2516 static const char __pyx_k_parameters[] = "parameters_";
2517 static const char __pyx_k_pyx_result[] = "__pyx_result";
2518 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2519 static const char __pyx_k_MemoryError[] = "MemoryError";
2520 static const char __pyx_k_PickleError[] = "PickleError";
2521 static const char __pyx_k_RuntimeError[] = "RuntimeError";
2522 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
2523 static const char __pyx_k_stringsource[] = "stringsource";
2524 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
2525 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2526 static const char __pyx_k_transpose_dot[] = "transpose_dot";
2527 static const char __pyx_k_set_parameters[] = "set_parameters";
2528 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
2529 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
2530 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
2531 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
2532 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2533 static const char __pyx_k_pycLinearOperator[] = "pycLinearOperator";
2534 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
2535 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2536 static const char __pyx_k_get_data_type_name[] = "get_data_type_name";
2537 static const char __pyx_k_get_num_parameters[] = "get_num_parameters";
2538 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
2539 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
2540 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
2541 static const char __pyx_k_pycLinearOperator_dot[] = "pycLinearOperator.dot";
2542 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
2543 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
2544 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
2545 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
2546 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
2547 static const char __pyx_k_LinearOperator_object_is_s[] = "LinearOperator object is: %s";
2548 static const char __pyx_k_Linear_operator_is_not_set[] = "Linear operator is not set.";
2549 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
2550 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
2551 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
2552 static const char __pyx_k_LongIndexType_has_an_unconventi[] = "\"LongIndexType\" has an unconventional byte size.";
2553 static const char __pyx_k_pycLinearOperator_get_data_type[] = "pycLinearOperator.get_data_type_name";
2554 static const char __pyx_k_pycLinearOperator_transpose_dot[] = "pycLinearOperator.transpose_dot";
2555 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
2556 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
2557 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
2558 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
2559 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
2560 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
2561 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
2562 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
2563 static const char __pyx_k_Linear_operator_data_type_is_not[] = "Linear operator data type is not set.";
2564 static const char __pyx_k_Linear_operator_double_type_is_n[] = "Linear operator (double type) is not set.";
2565 static const char __pyx_k_Linear_operator_float_type_is_no[] = "Linear operator (float type) is not set.";
2566 static const char __pyx_k_Linear_operator_long_double_type[] = "Linear operator (long double type) is not set.";
2567 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
2568 static const char __pyx_k_The_input_vector_and_product_sho[] = "The input vector and product should have ";
2569 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
2570 static const char __pyx_k_Vector_type_should_be_either_flo[] = "Vector type should be either \"float32\", \"float64\", or \"float128\".";
2571 static const char __pyx_k_Wrong_accessors_is_called_The_ty[] = "Wrong accessors is called. The type of the ";
2572 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
2573 static const char __pyx_k_imate__c_linear_operator_py_c_li[] = "imate/_c_linear_operator/py_c_linear_operator.pyx";
2574 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2575 static const char __pyx_k_pycLinearOperator___reduce_cytho[] = "pycLinearOperator.__reduce_cython__";
2576 static const char __pyx_k_pycLinearOperator___setstate_cyt[] = "pycLinearOperator.__setstate_cython__";
2577 static const char __pyx_k_pycLinearOperator_get_num_parame[] = "pycLinearOperator.get_num_parameters";
2578 static const char __pyx_k_pycLinearOperator_set_parameters[] = "pycLinearOperator.set_parameters";
2579 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
2580 static const char __pyx_k_imate__c_linear_operator_py_c_li_2[] = "imate._c_linear_operator.py_c_linear_operator";
2581 static PyObject *__pyx_n_s_ASCII;
2582 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
2583 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
2584 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
2585 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
2586 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
2587 static PyObject *__pyx_n_s_Ellipsis;
2588 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
2589 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
2590 static PyObject *__pyx_n_s_IndexError;
2591 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
2592 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
2593 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
2594 static PyObject *__pyx_kp_u_LinearOperator_object_is_s;
2595 static PyObject *__pyx_kp_u_Linear_operator_data_type_is_not;
2596 static PyObject *__pyx_kp_u_Linear_operator_double_type_is_n;
2597 static PyObject *__pyx_kp_u_Linear_operator_float_type_is_no;
2598 static PyObject *__pyx_kp_u_Linear_operator_is_not_set;
2599 static PyObject *__pyx_kp_u_Linear_operator_long_double_type;
2600 static PyObject *__pyx_kp_u_LongIndexType_has_an_unconventi;
2601 static PyObject *__pyx_n_s_MemoryError;
2602 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
2603 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
2604 static PyObject *__pyx_n_b_O;
2605 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
2606 static PyObject *__pyx_n_s_PickleError;
2607 static PyObject *__pyx_n_s_RuntimeError;
2608 static PyObject *__pyx_kp_u_The_input_vector_and_product_sho;
2609 static PyObject *__pyx_n_s_TypeError;
2610 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
2611 static PyObject *__pyx_n_s_ValueError;
2612 static PyObject *__pyx_kp_u_Vector_type_should_be_either_flo;
2613 static PyObject *__pyx_n_s_View_MemoryView;
2614 static PyObject *__pyx_kp_u_Wrong_accessors_is_called_The_ty;
2615 static PyObject *__pyx_n_s_allocate_buffer;
2616 static PyObject *__pyx_n_s_array;
2617 static PyObject *__pyx_n_s_astype;
2618 static PyObject *__pyx_n_s_base;
2619 static PyObject *__pyx_n_s_c;
2620 static PyObject *__pyx_n_u_c;
2621 static PyObject *__pyx_n_s_class;
2622 static PyObject *__pyx_n_s_cline_in_traceback;
2623 static PyObject *__pyx_kp_s_contiguous_and_direct;
2624 static PyObject *__pyx_kp_s_contiguous_and_indirect;
2625 static PyObject *__pyx_n_s_dict;
2626 static PyObject *__pyx_n_s_dot;
2627 static PyObject *__pyx_n_s_dtype;
2628 static PyObject *__pyx_n_s_dtype_is_object;
2629 static PyObject *__pyx_n_s_encode;
2630 static PyObject *__pyx_n_s_enumerate;
2631 static PyObject *__pyx_n_s_error;
2632 static PyObject *__pyx_n_s_flags;
2633 static PyObject *__pyx_n_b_float128;
2634 static PyObject *__pyx_n_u_float128;
2635 static PyObject *__pyx_n_b_float32;
2636 static PyObject *__pyx_n_u_float32;
2637 static PyObject *__pyx_n_b_float64;
2638 static PyObject *__pyx_n_u_float64;
2639 static PyObject *__pyx_n_s_format;
2640 static PyObject *__pyx_n_s_fortran;
2641 static PyObject *__pyx_n_u_fortran;
2642 static PyObject *__pyx_n_s_get_data_type_name;
2643 static PyObject *__pyx_n_s_get_num_parameters;
2644 static PyObject *__pyx_n_s_getstate;
2645 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
2646 static PyObject *__pyx_n_s_id;
2647 static PyObject *__pyx_kp_s_imate__c_linear_operator_py_c_li;
2648 static PyObject *__pyx_n_s_imate__c_linear_operator_py_c_li_2;
2649 static PyObject *__pyx_n_s_import;
2650 static PyObject *__pyx_n_s_isscalar;
2651 static PyObject *__pyx_n_s_itemsize;
2652 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
2653 static PyObject *__pyx_n_s_main;
2654 static PyObject *__pyx_n_s_memview;
2655 static PyObject *__pyx_n_s_mode;
2656 static PyObject *__pyx_n_s_name;
2657 static PyObject *__pyx_n_s_name_2;
2658 static PyObject *__pyx_n_s_ndim;
2659 static PyObject *__pyx_n_s_new;
2660 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2661 static PyObject *__pyx_n_s_numpy;
2662 static PyObject *__pyx_n_s_obj;
2663 static PyObject *__pyx_n_s_pack;
2664 static PyObject *__pyx_n_s_parameters;
2665 static PyObject *__pyx_n_s_pickle;
2666 static PyObject *__pyx_n_s_product;
2667 static PyObject *__pyx_n_s_pycLinearOperator;
2668 static PyObject *__pyx_n_s_pycLinearOperator___reduce_cytho;
2669 static PyObject *__pyx_n_s_pycLinearOperator___setstate_cyt;
2670 static PyObject *__pyx_n_s_pycLinearOperator_dot;
2671 static PyObject *__pyx_n_s_pycLinearOperator_get_data_type;
2672 static PyObject *__pyx_n_s_pycLinearOperator_get_num_parame;
2673 static PyObject *__pyx_n_s_pycLinearOperator_set_parameters;
2674 static PyObject *__pyx_n_s_pycLinearOperator_transpose_dot;
2675 static PyObject *__pyx_n_s_pyx_PickleError;
2676 static PyObject *__pyx_n_s_pyx_checksum;
2677 static PyObject *__pyx_n_s_pyx_getbuffer;
2678 static PyObject *__pyx_n_s_pyx_result;
2679 static PyObject *__pyx_n_s_pyx_state;
2680 static PyObject *__pyx_n_s_pyx_type;
2681 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
2682 static PyObject *__pyx_n_s_pyx_vtable;
2683 static PyObject *__pyx_n_s_range;
2684 static PyObject *__pyx_n_s_reduce;
2685 static PyObject *__pyx_n_s_reduce_cython;
2686 static PyObject *__pyx_n_s_reduce_ex;
2687 static PyObject *__pyx_n_s_self;
2688 static PyObject *__pyx_n_s_set_parameters;
2689 static PyObject *__pyx_n_s_setstate;
2690 static PyObject *__pyx_n_s_setstate_cython;
2691 static PyObject *__pyx_n_s_shape;
2692 static PyObject *__pyx_n_s_size;
2693 static PyObject *__pyx_n_s_start;
2694 static PyObject *__pyx_n_s_step;
2695 static PyObject *__pyx_n_s_stop;
2696 static PyObject *__pyx_kp_s_strided_and_direct;
2697 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
2698 static PyObject *__pyx_kp_s_strided_and_indirect;
2699 static PyObject *__pyx_kp_s_stringsource;
2700 static PyObject *__pyx_n_s_struct;
2701 static PyObject *__pyx_n_s_test;
2702 static PyObject *__pyx_n_s_transpose_dot;
2703 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
2704 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
2705 static PyObject *__pyx_n_s_unpack;
2706 static PyObject *__pyx_n_s_update;
2707 static PyObject *__pyx_n_s_vector;
2708 static int __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator___cinit__(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto */
2709 static void __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_2__dealloc__(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto */
2710 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto */
2711 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto */
2712 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_parameters_); /* proto */
2713 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_10dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product); /* proto */
2714 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_12transpose_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product); /* proto */
2715 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto */
2716 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2717 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
2718 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2719 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2720 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2721 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2722 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
2723 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
2724 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
2725 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
2726 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2727 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
2728 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2729 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2730 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
2731 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
2732 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2733 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
2734 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
2735 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2736 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2737 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2738 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2739 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2740 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2741 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2742 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2743 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2744 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2745 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2746 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2747 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2748 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2749 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2750 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2751 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2752 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2753 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2754 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2755 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2756 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2757 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2758 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
2759 static PyObject *__pyx_tp_new_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2760 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2761 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2762 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2763 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2764 static PyObject *__pyx_int_0;
2765 static PyObject *__pyx_int_1;
2766 static PyObject *__pyx_int_112105877;
2767 static PyObject *__pyx_int_136983863;
2768 static PyObject *__pyx_int_184977713;
2769 static PyObject *__pyx_int_neg_1;
2770 static PyObject *__pyx_tuple_;
2771 static PyObject *__pyx_tuple__2;
2772 static PyObject *__pyx_tuple__5;
2773 static PyObject *__pyx_tuple__6;
2774 static PyObject *__pyx_tuple__7;
2775 static PyObject *__pyx_tuple__8;
2776 static PyObject *__pyx_slice__32;
2777 static PyObject *__pyx_tuple__11;
2778 static PyObject *__pyx_tuple__12;
2779 static PyObject *__pyx_tuple__15;
2780 static PyObject *__pyx_tuple__17;
2781 static PyObject *__pyx_tuple__18;
2782 static PyObject *__pyx_tuple__19;
2783 static PyObject *__pyx_tuple__20;
2784 static PyObject *__pyx_tuple__21;
2785 static PyObject *__pyx_tuple__22;
2786 static PyObject *__pyx_tuple__23;
2787 static PyObject *__pyx_tuple__24;
2788 static PyObject *__pyx_tuple__25;
2789 static PyObject *__pyx_tuple__26;
2790 static PyObject *__pyx_tuple__27;
2791 static PyObject *__pyx_tuple__28;
2792 static PyObject *__pyx_tuple__29;
2793 static PyObject *__pyx_tuple__30;
2794 static PyObject *__pyx_tuple__31;
2795 static PyObject *__pyx_tuple__33;
2796 static PyObject *__pyx_tuple__34;
2797 static PyObject *__pyx_tuple__35;
2798 static PyObject *__pyx_tuple__37;
2799 static PyObject *__pyx_tuple__38;
2800 static PyObject *__pyx_tuple__39;
2801 static PyObject *__pyx_tuple__40;
2802 static PyObject *__pyx_tuple__41;
2803 static PyObject *__pyx_tuple__42;
2804 static PyObject *__pyx_tuple__43;
2805 static PyObject *__pyx_tuple__44;
2806 static PyObject *__pyx_tuple__45;
2807 static PyObject *__pyx_tuple__46;
2808 static PyObject *__pyx_tuple__47;
2809 static PyObject *__pyx_tuple__48;
2810 static PyObject *__pyx_tuple__49;
2811 static PyObject *__pyx_tuple__50;
2812 static PyObject *__pyx_codeobj__3;
2813 static PyObject *__pyx_codeobj__4;
2814 static PyObject *__pyx_codeobj__9;
2815 static PyObject *__pyx_codeobj__10;
2816 static PyObject *__pyx_codeobj__13;
2817 static PyObject *__pyx_codeobj__14;
2818 static PyObject *__pyx_codeobj__16;
2819 static PyObject *__pyx_codeobj__36;
2820 /* Late includes */
2821 
2822 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":34
2823  * # =========
2824  *
2825  * def __cinit__(self): # <<<<<<<<<<<<<<
2826  * """
2827  * Initializes attributes to zero.
2828  */
2829 
2830 /* Python wrapper */
2831 static int __pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2832 static int __pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2833  int __pyx_r;
2834  __Pyx_RefNannyDeclarations
2835  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2836  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
2837  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
2838  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
2839  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator___cinit__(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self));
2840 
2841  /* function exit code */
2842  __Pyx_RefNannyFinishContext();
2843  return __pyx_r;
2844 }
2845 
2846 static int __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator___cinit__(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
2847  LongIndexType __pyx_v_long_index;
2848  int __pyx_v_unsigned_type;
2849  int __pyx_r;
2850  __Pyx_TraceDeclarations
2851  __Pyx_RefNannyDeclarations
2852  int __pyx_t_1;
2853  PyObject *__pyx_t_2 = NULL;
2854  int __pyx_lineno = 0;
2855  const char *__pyx_filename = NULL;
2856  int __pyx_clineno = 0;
2857  __Pyx_RefNannySetupContext("__cinit__", 0);
2858  __Pyx_TraceCall("__cinit__", __pyx_f[0], 34, 0, __PYX_ERR(0, 34, __pyx_L1_error));
2859 
2860  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":40
2861  *
2862  * # Initialize member data
2863  * self.Aop_float = NULL # <<<<<<<<<<<<<<
2864  * self.Aop_double = NULL
2865  * self.Aop_long_double = NULL
2866  */
2867  __Pyx_TraceLine(40,0,__PYX_ERR(0, 40, __pyx_L1_error))
2868  __pyx_v_self->Aop_float = NULL;
2869 
2870  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":41
2871  * # Initialize member data
2872  * self.Aop_float = NULL
2873  * self.Aop_double = NULL # <<<<<<<<<<<<<<
2874  * self.Aop_long_double = NULL
2875  * self.data_type_name = NULL
2876  */
2877  __Pyx_TraceLine(41,0,__PYX_ERR(0, 41, __pyx_L1_error))
2878  __pyx_v_self->Aop_double = NULL;
2879 
2880  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":42
2881  * self.Aop_float = NULL
2882  * self.Aop_double = NULL
2883  * self.Aop_long_double = NULL # <<<<<<<<<<<<<<
2884  * self.data_type_name = NULL
2885  * self.long_index_type_name = NULL
2886  */
2887  __Pyx_TraceLine(42,0,__PYX_ERR(0, 42, __pyx_L1_error))
2888  __pyx_v_self->Aop_long_double = NULL;
2889 
2890  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":43
2891  * self.Aop_double = NULL
2892  * self.Aop_long_double = NULL
2893  * self.data_type_name = NULL # <<<<<<<<<<<<<<
2894  * self.long_index_type_name = NULL
2895  * self.parameters = None
2896  */
2897  __Pyx_TraceLine(43,0,__PYX_ERR(0, 43, __pyx_L1_error))
2898  __pyx_v_self->data_type_name = NULL;
2899 
2900  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":44
2901  * self.Aop_long_double = NULL
2902  * self.data_type_name = NULL
2903  * self.long_index_type_name = NULL # <<<<<<<<<<<<<<
2904  * self.parameters = None
2905  *
2906  */
2907  __Pyx_TraceLine(44,0,__PYX_ERR(0, 44, __pyx_L1_error))
2908  __pyx_v_self->long_index_type_name = NULL;
2909 
2910  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":45
2911  * self.data_type_name = NULL
2912  * self.long_index_type_name = NULL
2913  * self.parameters = None # <<<<<<<<<<<<<<
2914  *
2915  * # Check LongIndexType is a signed or unsigned type. If -1 overflows,
2916  */
2917  __Pyx_TraceLine(45,0,__PYX_ERR(0, 45, __pyx_L1_error))
2918  __Pyx_INCREF(Py_None);
2919  __Pyx_GIVEREF(Py_None);
2920  __Pyx_GOTREF(__pyx_v_self->parameters);
2921  __Pyx_DECREF(__pyx_v_self->parameters);
2922  __pyx_v_self->parameters = Py_None;
2923 
2924  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":49
2925  * # Check LongIndexType is a signed or unsigned type. If -1 overflows,
2926  * # the type is unsigned.
2927  * cdef LongIndexType long_index = -1 # <<<<<<<<<<<<<<
2928  * if long_index < 1:
2929  * unsigned_type = False
2930  */
2931  __Pyx_TraceLine(49,0,__PYX_ERR(0, 49, __pyx_L1_error))
2932  __pyx_v_long_index = -1;
2933 
2934  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":50
2935  * # the type is unsigned.
2936  * cdef LongIndexType long_index = -1
2937  * if long_index < 1: # <<<<<<<<<<<<<<
2938  * unsigned_type = False
2939  * else:
2940  */
2941  __Pyx_TraceLine(50,0,__PYX_ERR(0, 50, __pyx_L1_error))
2942  __pyx_t_1 = ((__pyx_v_long_index < 1) != 0);
2943  if (__pyx_t_1) {
2944 
2945  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":51
2946  * cdef LongIndexType long_index = -1
2947  * if long_index < 1:
2948  * unsigned_type = False # <<<<<<<<<<<<<<
2949  * else:
2950  * unsigned_type = True
2951  */
2952  __Pyx_TraceLine(51,0,__PYX_ERR(0, 51, __pyx_L1_error))
2953  __pyx_v_unsigned_type = 0;
2954 
2955  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":50
2956  * # the type is unsigned.
2957  * cdef LongIndexType long_index = -1
2958  * if long_index < 1: # <<<<<<<<<<<<<<
2959  * unsigned_type = False
2960  * else:
2961  */
2962  goto __pyx_L3;
2963  }
2964 
2965  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":53
2966  * unsigned_type = False
2967  * else:
2968  * unsigned_type = True # <<<<<<<<<<<<<<
2969  *
2970  * # Set the long index type name
2971  */
2972  __Pyx_TraceLine(53,0,__PYX_ERR(0, 53, __pyx_L1_error))
2973  /*else*/ {
2974  __pyx_v_unsigned_type = 1;
2975  }
2976  __pyx_L3:;
2977 
2978  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":56
2979  *
2980  * # Set the long index type name
2981  * if sizeof(LongIndexType) == 4: # <<<<<<<<<<<<<<
2982  * if unsigned_type:
2983  * self.long_index_type_name = r'uint32'
2984  */
2985  __Pyx_TraceLine(56,0,__PYX_ERR(0, 56, __pyx_L1_error))
2986  __pyx_t_1 = (((sizeof(LongIndexType)) == 4) != 0);
2987  if (__pyx_t_1) {
2988 
2989  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":57
2990  * # Set the long index type name
2991  * if sizeof(LongIndexType) == 4:
2992  * if unsigned_type: # <<<<<<<<<<<<<<
2993  * self.long_index_type_name = r'uint32'
2994  * else:
2995  */
2996  __Pyx_TraceLine(57,0,__PYX_ERR(0, 57, __pyx_L1_error))
2997  __pyx_t_1 = (__pyx_v_unsigned_type != 0);
2998  if (__pyx_t_1) {
2999 
3000  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":58
3001  * if sizeof(LongIndexType) == 4:
3002  * if unsigned_type:
3003  * self.long_index_type_name = r'uint32' # <<<<<<<<<<<<<<
3004  * else:
3005  * self.long_index_type_name = r'int32'
3006  */
3007  __Pyx_TraceLine(58,0,__PYX_ERR(0, 58, __pyx_L1_error))
3008  __pyx_v_self->long_index_type_name = ((char *)"uint32");
3009 
3010  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":57
3011  * # Set the long index type name
3012  * if sizeof(LongIndexType) == 4:
3013  * if unsigned_type: # <<<<<<<<<<<<<<
3014  * self.long_index_type_name = r'uint32'
3015  * else:
3016  */
3017  goto __pyx_L5;
3018  }
3019 
3020  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":60
3021  * self.long_index_type_name = r'uint32'
3022  * else:
3023  * self.long_index_type_name = r'int32' # <<<<<<<<<<<<<<
3024  * elif sizeof(LongIndexType) == 8:
3025  * if unsigned_type:
3026  */
3027  __Pyx_TraceLine(60,0,__PYX_ERR(0, 60, __pyx_L1_error))
3028  /*else*/ {
3029  __pyx_v_self->long_index_type_name = ((char *)"int32");
3030  }
3031  __pyx_L5:;
3032 
3033  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":56
3034  *
3035  * # Set the long index type name
3036  * if sizeof(LongIndexType) == 4: # <<<<<<<<<<<<<<
3037  * if unsigned_type:
3038  * self.long_index_type_name = r'uint32'
3039  */
3040  goto __pyx_L4;
3041  }
3042 
3043  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":61
3044  * else:
3045  * self.long_index_type_name = r'int32'
3046  * elif sizeof(LongIndexType) == 8: # <<<<<<<<<<<<<<
3047  * if unsigned_type:
3048  * self.long_index_type_name = r'uint64'
3049  */
3050  __Pyx_TraceLine(61,0,__PYX_ERR(0, 61, __pyx_L1_error))
3051  __pyx_t_1 = (((sizeof(LongIndexType)) == 8) != 0);
3052  if (likely(__pyx_t_1)) {
3053 
3054  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":62
3055  * self.long_index_type_name = r'int32'
3056  * elif sizeof(LongIndexType) == 8:
3057  * if unsigned_type: # <<<<<<<<<<<<<<
3058  * self.long_index_type_name = r'uint64'
3059  * else:
3060  */
3061  __Pyx_TraceLine(62,0,__PYX_ERR(0, 62, __pyx_L1_error))
3062  __pyx_t_1 = (__pyx_v_unsigned_type != 0);
3063  if (__pyx_t_1) {
3064 
3065  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":63
3066  * elif sizeof(LongIndexType) == 8:
3067  * if unsigned_type:
3068  * self.long_index_type_name = r'uint64' # <<<<<<<<<<<<<<
3069  * else:
3070  * self.long_index_type_name = r'int64'
3071  */
3072  __Pyx_TraceLine(63,0,__PYX_ERR(0, 63, __pyx_L1_error))
3073  __pyx_v_self->long_index_type_name = ((char *)"uint64");
3074 
3075  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":62
3076  * self.long_index_type_name = r'int32'
3077  * elif sizeof(LongIndexType) == 8:
3078  * if unsigned_type: # <<<<<<<<<<<<<<
3079  * self.long_index_type_name = r'uint64'
3080  * else:
3081  */
3082  goto __pyx_L6;
3083  }
3084 
3085  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":65
3086  * self.long_index_type_name = r'uint64'
3087  * else:
3088  * self.long_index_type_name = r'int64' # <<<<<<<<<<<<<<
3089  * else:
3090  * raise TypeError('"LongIndexType" has an unconventional byte size.')
3091  */
3092  __Pyx_TraceLine(65,0,__PYX_ERR(0, 65, __pyx_L1_error))
3093  /*else*/ {
3094  __pyx_v_self->long_index_type_name = ((char *)"int64");
3095  }
3096  __pyx_L6:;
3097 
3098  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":61
3099  * else:
3100  * self.long_index_type_name = r'int32'
3101  * elif sizeof(LongIndexType) == 8: # <<<<<<<<<<<<<<
3102  * if unsigned_type:
3103  * self.long_index_type_name = r'uint64'
3104  */
3105  goto __pyx_L4;
3106  }
3107 
3108  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":67
3109  * self.long_index_type_name = r'int64'
3110  * else:
3111  * raise TypeError('"LongIndexType" has an unconventional byte size.') # <<<<<<<<<<<<<<
3112  *
3113  * # ===========
3114  */
3115  __Pyx_TraceLine(67,0,__PYX_ERR(0, 67, __pyx_L1_error))
3116  /*else*/ {
3117  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error)
3118  __Pyx_GOTREF(__pyx_t_2);
3119  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
3120  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3121  __PYX_ERR(0, 67, __pyx_L1_error)
3122  }
3123  __pyx_L4:;
3124 
3125  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":34
3126  * # =========
3127  *
3128  * def __cinit__(self): # <<<<<<<<<<<<<<
3129  * """
3130  * Initializes attributes to zero.
3131  */
3132 
3133  /* function exit code */
3134  __pyx_r = 0;
3135  goto __pyx_L0;
3136  __pyx_L1_error:;
3137  __Pyx_XDECREF(__pyx_t_2);
3138  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3139  __pyx_r = -1;
3140  __pyx_L0:;
3141  __Pyx_TraceReturn(Py_None, 0);
3142  __Pyx_RefNannyFinishContext();
3143  return __pyx_r;
3144 }
3145 
3146 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":73
3147  * # ===========
3148  *
3149  * def __dealloc__(self): # <<<<<<<<<<<<<<
3150  * """
3151  * """
3152  */
3153 
3154 /* Python wrapper */
3155 static void __pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
3156 static void __pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_3__dealloc__(PyObject *__pyx_v_self) {
3157  __Pyx_RefNannyDeclarations
3158  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3159  __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_2__dealloc__(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self));
3160 
3161  /* function exit code */
3162  __Pyx_RefNannyFinishContext();
3163 }
3164 
3165 static void __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_2__dealloc__(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
3166  __Pyx_TraceDeclarations
3167  __Pyx_RefNannyDeclarations
3168  int __pyx_t_1;
3169  int __pyx_lineno = 0;
3170  const char *__pyx_filename = NULL;
3171  int __pyx_clineno = 0;
3172  __Pyx_RefNannySetupContext("__dealloc__", 0);
3173  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 73, 0, __PYX_ERR(0, 73, __pyx_L1_error));
3174 
3175  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":77
3176  * """
3177  *
3178  * if self.Aop_float != NULL: # <<<<<<<<<<<<<<
3179  * del self.Aop_float
3180  * self.Aop_float = NULL
3181  */
3182  __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error))
3183  __pyx_t_1 = ((__pyx_v_self->Aop_float != NULL) != 0);
3184  if (__pyx_t_1) {
3185 
3186  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":78
3187  *
3188  * if self.Aop_float != NULL:
3189  * del self.Aop_float # <<<<<<<<<<<<<<
3190  * self.Aop_float = NULL
3191  *
3192  */
3193  __Pyx_TraceLine(78,0,__PYX_ERR(0, 78, __pyx_L1_error))
3194  delete __pyx_v_self->Aop_float;
3195 
3196  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":79
3197  * if self.Aop_float != NULL:
3198  * del self.Aop_float
3199  * self.Aop_float = NULL # <<<<<<<<<<<<<<
3200  *
3201  * if self.Aop_double != NULL:
3202  */
3203  __Pyx_TraceLine(79,0,__PYX_ERR(0, 79, __pyx_L1_error))
3204  __pyx_v_self->Aop_float = NULL;
3205 
3206  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":77
3207  * """
3208  *
3209  * if self.Aop_float != NULL: # <<<<<<<<<<<<<<
3210  * del self.Aop_float
3211  * self.Aop_float = NULL
3212  */
3213  }
3214 
3215  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":81
3216  * self.Aop_float = NULL
3217  *
3218  * if self.Aop_double != NULL: # <<<<<<<<<<<<<<
3219  * del self.Aop_double
3220  * self.Aop_double = NULL
3221  */
3222  __Pyx_TraceLine(81,0,__PYX_ERR(0, 81, __pyx_L1_error))
3223  __pyx_t_1 = ((__pyx_v_self->Aop_double != NULL) != 0);
3224  if (__pyx_t_1) {
3225 
3226  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":82
3227  *
3228  * if self.Aop_double != NULL:
3229  * del self.Aop_double # <<<<<<<<<<<<<<
3230  * self.Aop_double = NULL
3231  *
3232  */
3233  __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L1_error))
3234  delete __pyx_v_self->Aop_double;
3235 
3236  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":83
3237  * if self.Aop_double != NULL:
3238  * del self.Aop_double
3239  * self.Aop_double = NULL # <<<<<<<<<<<<<<
3240  *
3241  * if self.Aop_long_double != NULL:
3242  */
3243  __Pyx_TraceLine(83,0,__PYX_ERR(0, 83, __pyx_L1_error))
3244  __pyx_v_self->Aop_double = NULL;
3245 
3246  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":81
3247  * self.Aop_float = NULL
3248  *
3249  * if self.Aop_double != NULL: # <<<<<<<<<<<<<<
3250  * del self.Aop_double
3251  * self.Aop_double = NULL
3252  */
3253  }
3254 
3255  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":85
3256  * self.Aop_double = NULL
3257  *
3258  * if self.Aop_long_double != NULL: # <<<<<<<<<<<<<<
3259  * del self.Aop_long_double
3260  * self.Aop_long_double = NULL
3261  */
3262  __Pyx_TraceLine(85,0,__PYX_ERR(0, 85, __pyx_L1_error))
3263  __pyx_t_1 = ((__pyx_v_self->Aop_long_double != NULL) != 0);
3264  if (__pyx_t_1) {
3265 
3266  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":86
3267  *
3268  * if self.Aop_long_double != NULL:
3269  * del self.Aop_long_double # <<<<<<<<<<<<<<
3270  * self.Aop_long_double = NULL
3271  *
3272  */
3273  __Pyx_TraceLine(86,0,__PYX_ERR(0, 86, __pyx_L1_error))
3274  delete __pyx_v_self->Aop_long_double;
3275 
3276  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":87
3277  * if self.Aop_long_double != NULL:
3278  * del self.Aop_long_double
3279  * self.Aop_long_double = NULL # <<<<<<<<<<<<<<
3280  *
3281  * # ============
3282  */
3283  __Pyx_TraceLine(87,0,__PYX_ERR(0, 87, __pyx_L1_error))
3284  __pyx_v_self->Aop_long_double = NULL;
3285 
3286  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":85
3287  * self.Aop_double = NULL
3288  *
3289  * if self.Aop_long_double != NULL: # <<<<<<<<<<<<<<
3290  * del self.Aop_long_double
3291  * self.Aop_long_double = NULL
3292  */
3293  }
3294 
3295  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":73
3296  * # ===========
3297  *
3298  * def __dealloc__(self): # <<<<<<<<<<<<<<
3299  * """
3300  * """
3301  */
3302 
3303  /* function exit code */
3304  goto __pyx_L0;
3305  __pyx_L1_error:;
3306  __Pyx_WriteUnraisable("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
3307  __pyx_L0:;
3308  __Pyx_TraceReturn(Py_None, 0);
3309  __Pyx_RefNannyFinishContext();
3310 }
3311 
3312 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":93
3313  * # ============
3314  *
3315  * cdef LongIndexType get_num_rows(self) except *: # <<<<<<<<<<<<<<
3316  * """
3317  * :return Number of rows of matrix.
3318  */
3319 
3320 static LongIndexType __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_rows(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
3321  LongIndexType __pyx_r;
3322  __Pyx_TraceDeclarations
3323  __Pyx_RefNannyDeclarations
3324  int __pyx_t_1;
3325  PyObject *__pyx_t_2 = NULL;
3326  int __pyx_t_3;
3327  int __pyx_lineno = 0;
3328  const char *__pyx_filename = NULL;
3329  int __pyx_clineno = 0;
3330  __Pyx_RefNannySetupContext("get_num_rows", 0);
3331  __Pyx_TraceCall("get_num_rows", __pyx_f[0], 93, 0, __PYX_ERR(0, 93, __pyx_L1_error));
3332 
3333  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":99
3334  * """
3335  *
3336  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3337  * return self.Aop_float.get_num_rows()
3338  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3339  */
3340  __Pyx_TraceLine(99,0,__PYX_ERR(0, 99, __pyx_L1_error))
3341  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
3342  __Pyx_GOTREF(__pyx_t_2);
3343  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 99, __pyx_L1_error)
3344  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3345  if (__pyx_t_3) {
3346  } else {
3347  __pyx_t_1 = __pyx_t_3;
3348  goto __pyx_L4_bool_binop_done;
3349  }
3350  __pyx_t_3 = ((__pyx_v_self->Aop_float != NULL) != 0);
3351  __pyx_t_1 = __pyx_t_3;
3352  __pyx_L4_bool_binop_done:;
3353  if (__pyx_t_1) {
3354 
3355  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":100
3356  *
3357  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3358  * return self.Aop_float.get_num_rows() # <<<<<<<<<<<<<<
3359  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3360  * return self.Aop_double.get_num_rows()
3361  */
3362  __Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error))
3363  __pyx_r = __pyx_v_self->Aop_float->get_num_rows();
3364  goto __pyx_L0;
3365 
3366  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":99
3367  * """
3368  *
3369  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3370  * return self.Aop_float.get_num_rows()
3371  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3372  */
3373  }
3374 
3375  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":101
3376  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3377  * return self.Aop_float.get_num_rows()
3378  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3379  * return self.Aop_double.get_num_rows()
3380  * elif self.data_type_name == b'float128' and \
3381  */
3382  __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error))
3383  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
3384  __Pyx_GOTREF(__pyx_t_2);
3385  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 101, __pyx_L1_error)
3386  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3387  if (__pyx_t_3) {
3388  } else {
3389  __pyx_t_1 = __pyx_t_3;
3390  goto __pyx_L6_bool_binop_done;
3391  }
3392  __pyx_t_3 = ((__pyx_v_self->Aop_double != NULL) != 0);
3393  __pyx_t_1 = __pyx_t_3;
3394  __pyx_L6_bool_binop_done:;
3395  if (__pyx_t_1) {
3396 
3397  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":102
3398  * return self.Aop_float.get_num_rows()
3399  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3400  * return self.Aop_double.get_num_rows() # <<<<<<<<<<<<<<
3401  * elif self.data_type_name == b'float128' and \
3402  * self.Aop_long_double != NULL:
3403  */
3404  __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error))
3405  __pyx_r = __pyx_v_self->Aop_double->get_num_rows();
3406  goto __pyx_L0;
3407 
3408  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":101
3409  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3410  * return self.Aop_float.get_num_rows()
3411  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3412  * return self.Aop_double.get_num_rows()
3413  * elif self.data_type_name == b'float128' and \
3414  */
3415  }
3416 
3417  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":103
3418  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3419  * return self.Aop_double.get_num_rows()
3420  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3421  * self.Aop_long_double != NULL:
3422  * return self.Aop_long_double.get_num_rows()
3423  */
3424  __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error))
3425  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
3426  __Pyx_GOTREF(__pyx_t_2);
3427  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float128, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 103, __pyx_L1_error)
3428  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3429  if (__pyx_t_3) {
3430  } else {
3431  __pyx_t_1 = __pyx_t_3;
3432  goto __pyx_L8_bool_binop_done;
3433  }
3434 
3435  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":104
3436  * return self.Aop_double.get_num_rows()
3437  * elif self.data_type_name == b'float128' and \
3438  * self.Aop_long_double != NULL: # <<<<<<<<<<<<<<
3439  * return self.Aop_long_double.get_num_rows()
3440  * else:
3441  */
3442  __Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error))
3443  __pyx_t_3 = ((__pyx_v_self->Aop_long_double != NULL) != 0);
3444  __pyx_t_1 = __pyx_t_3;
3445  __pyx_L8_bool_binop_done:;
3446 
3447  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":103
3448  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3449  * return self.Aop_double.get_num_rows()
3450  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3451  * self.Aop_long_double != NULL:
3452  * return self.Aop_long_double.get_num_rows()
3453  */
3454  __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error))
3455  if (likely(__pyx_t_1)) {
3456 
3457  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":105
3458  * elif self.data_type_name == b'float128' and \
3459  * self.Aop_long_double != NULL:
3460  * return self.Aop_long_double.get_num_rows() # <<<<<<<<<<<<<<
3461  * else:
3462  * raise ValueError('Linear operator is not set.')
3463  */
3464  __Pyx_TraceLine(105,0,__PYX_ERR(0, 105, __pyx_L1_error))
3465  __pyx_r = __pyx_v_self->Aop_long_double->get_num_rows();
3466  goto __pyx_L0;
3467 
3468  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":103
3469  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3470  * return self.Aop_double.get_num_rows()
3471  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3472  * self.Aop_long_double != NULL:
3473  * return self.Aop_long_double.get_num_rows()
3474  */
3475  }
3476 
3477  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":107
3478  * return self.Aop_long_double.get_num_rows()
3479  * else:
3480  * raise ValueError('Linear operator is not set.') # <<<<<<<<<<<<<<
3481  *
3482  * # ===============
3483  */
3484  __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error))
3485  /*else*/ {
3486  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
3487  __Pyx_GOTREF(__pyx_t_2);
3488  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
3489  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3490  __PYX_ERR(0, 107, __pyx_L1_error)
3491  }
3492 
3493  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":93
3494  * # ============
3495  *
3496  * cdef LongIndexType get_num_rows(self) except *: # <<<<<<<<<<<<<<
3497  * """
3498  * :return Number of rows of matrix.
3499  */
3500 
3501  /* function exit code */
3502  __pyx_L1_error:;
3503  __Pyx_XDECREF(__pyx_t_2);
3504  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_num_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
3505  __pyx_r = 0;
3506  __pyx_L0:;
3507  __Pyx_TraceReturn(Py_None, 0);
3508  __Pyx_RefNannyFinishContext();
3509  return __pyx_r;
3510 }
3511 
3512 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":113
3513  * # ===============
3514  *
3515  * cdef LongIndexType get_num_columns(self) except *: # <<<<<<<<<<<<<<
3516  * """
3517  * :return Number of rows of matrix.
3518  */
3519 
3520 static LongIndexType __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_columns(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
3521  LongIndexType __pyx_r;
3522  __Pyx_TraceDeclarations
3523  __Pyx_RefNannyDeclarations
3524  int __pyx_t_1;
3525  PyObject *__pyx_t_2 = NULL;
3526  int __pyx_t_3;
3527  int __pyx_lineno = 0;
3528  const char *__pyx_filename = NULL;
3529  int __pyx_clineno = 0;
3530  __Pyx_RefNannySetupContext("get_num_columns", 0);
3531  __Pyx_TraceCall("get_num_columns", __pyx_f[0], 113, 0, __PYX_ERR(0, 113, __pyx_L1_error));
3532 
3533  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":119
3534  * """
3535  *
3536  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3537  * return self.Aop_float.get_num_columns()
3538  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3539  */
3540  __Pyx_TraceLine(119,0,__PYX_ERR(0, 119, __pyx_L1_error))
3541  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
3542  __Pyx_GOTREF(__pyx_t_2);
3543  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
3544  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3545  if (__pyx_t_3) {
3546  } else {
3547  __pyx_t_1 = __pyx_t_3;
3548  goto __pyx_L4_bool_binop_done;
3549  }
3550  __pyx_t_3 = ((__pyx_v_self->Aop_float != NULL) != 0);
3551  __pyx_t_1 = __pyx_t_3;
3552  __pyx_L4_bool_binop_done:;
3553  if (__pyx_t_1) {
3554 
3555  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":120
3556  *
3557  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3558  * return self.Aop_float.get_num_columns() # <<<<<<<<<<<<<<
3559  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3560  * return self.Aop_double.get_num_columns()
3561  */
3562  __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error))
3563  __pyx_r = __pyx_v_self->Aop_float->get_num_columns();
3564  goto __pyx_L0;
3565 
3566  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":119
3567  * """
3568  *
3569  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3570  * return self.Aop_float.get_num_columns()
3571  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3572  */
3573  }
3574 
3575  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":121
3576  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3577  * return self.Aop_float.get_num_columns()
3578  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3579  * return self.Aop_double.get_num_columns()
3580  * elif self.data_type_name == b'float128' and \
3581  */
3582  __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error))
3583  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error)
3584  __Pyx_GOTREF(__pyx_t_2);
3585  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 121, __pyx_L1_error)
3586  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3587  if (__pyx_t_3) {
3588  } else {
3589  __pyx_t_1 = __pyx_t_3;
3590  goto __pyx_L6_bool_binop_done;
3591  }
3592  __pyx_t_3 = ((__pyx_v_self->Aop_double != NULL) != 0);
3593  __pyx_t_1 = __pyx_t_3;
3594  __pyx_L6_bool_binop_done:;
3595  if (__pyx_t_1) {
3596 
3597  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":122
3598  * return self.Aop_float.get_num_columns()
3599  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3600  * return self.Aop_double.get_num_columns() # <<<<<<<<<<<<<<
3601  * elif self.data_type_name == b'float128' and \
3602  * self.Aop_long_double != NULL:
3603  */
3604  __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error))
3605  __pyx_r = __pyx_v_self->Aop_double->get_num_columns();
3606  goto __pyx_L0;
3607 
3608  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":121
3609  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3610  * return self.Aop_float.get_num_columns()
3611  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3612  * return self.Aop_double.get_num_columns()
3613  * elif self.data_type_name == b'float128' and \
3614  */
3615  }
3616 
3617  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":123
3618  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3619  * return self.Aop_double.get_num_columns()
3620  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3621  * self.Aop_long_double != NULL:
3622  * return self.Aop_long_double.get_num_columns()
3623  */
3624  __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error))
3625  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
3626  __Pyx_GOTREF(__pyx_t_2);
3627  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float128, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 123, __pyx_L1_error)
3628  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3629  if (__pyx_t_3) {
3630  } else {
3631  __pyx_t_1 = __pyx_t_3;
3632  goto __pyx_L8_bool_binop_done;
3633  }
3634 
3635  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":124
3636  * return self.Aop_double.get_num_columns()
3637  * elif self.data_type_name == b'float128' and \
3638  * self.Aop_long_double != NULL: # <<<<<<<<<<<<<<
3639  * return self.Aop_long_double.get_num_columns()
3640  * else:
3641  */
3642  __Pyx_TraceLine(124,0,__PYX_ERR(0, 124, __pyx_L1_error))
3643  __pyx_t_3 = ((__pyx_v_self->Aop_long_double != NULL) != 0);
3644  __pyx_t_1 = __pyx_t_3;
3645  __pyx_L8_bool_binop_done:;
3646 
3647  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":123
3648  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3649  * return self.Aop_double.get_num_columns()
3650  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3651  * self.Aop_long_double != NULL:
3652  * return self.Aop_long_double.get_num_columns()
3653  */
3654  __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error))
3655  if (likely(__pyx_t_1)) {
3656 
3657  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":125
3658  * elif self.data_type_name == b'float128' and \
3659  * self.Aop_long_double != NULL:
3660  * return self.Aop_long_double.get_num_columns() # <<<<<<<<<<<<<<
3661  * else:
3662  * raise ValueError('Linear operator is not set.')
3663  */
3664  __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error))
3665  __pyx_r = __pyx_v_self->Aop_long_double->get_num_columns();
3666  goto __pyx_L0;
3667 
3668  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":123
3669  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3670  * return self.Aop_double.get_num_columns()
3671  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3672  * self.Aop_long_double != NULL:
3673  * return self.Aop_long_double.get_num_columns()
3674  */
3675  }
3676 
3677  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":127
3678  * return self.Aop_long_double.get_num_columns()
3679  * else:
3680  * raise ValueError('Linear operator is not set.') # <<<<<<<<<<<<<<
3681  *
3682  * # ==================
3683  */
3684  __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error))
3685  /*else*/ {
3686  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
3687  __Pyx_GOTREF(__pyx_t_2);
3688  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
3689  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3690  __PYX_ERR(0, 127, __pyx_L1_error)
3691  }
3692 
3693  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":113
3694  * # ===============
3695  *
3696  * cdef LongIndexType get_num_columns(self) except *: # <<<<<<<<<<<<<<
3697  * """
3698  * :return Number of rows of matrix.
3699  */
3700 
3701  /* function exit code */
3702  __pyx_L1_error:;
3703  __Pyx_XDECREF(__pyx_t_2);
3704  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_num_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
3705  __pyx_r = 0;
3706  __pyx_L0:;
3707  __Pyx_TraceReturn(Py_None, 0);
3708  __Pyx_RefNannyFinishContext();
3709  return __pyx_r;
3710 }
3711 
3712 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":133
3713  * # ==================
3714  *
3715  * def get_num_parameters(self): # <<<<<<<<<<<<<<
3716  * """
3717  * :return: Number of parameters.
3718  */
3719 
3720 /* Python wrapper */
3721 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3722 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters[] = "pycLinearOperator.get_num_parameters(self)\n\n :return: Number of parameters.\n :rtype: IndexType\n ";
3723 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters = {"get_num_parameters", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters};
3724 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3725  PyObject *__pyx_r = 0;
3726  __Pyx_RefNannyDeclarations
3727  __Pyx_RefNannySetupContext("get_num_parameters (wrapper)", 0);
3728  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self));
3729 
3730  /* function exit code */
3731  __Pyx_RefNannyFinishContext();
3732  return __pyx_r;
3733 }
3734 
3735 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
3736  PyObject *__pyx_r = NULL;
3737  __Pyx_TraceDeclarations
3738  __Pyx_RefNannyDeclarations
3739  int __pyx_t_1;
3740  PyObject *__pyx_t_2 = NULL;
3741  int __pyx_t_3;
3742  int __pyx_lineno = 0;
3743  const char *__pyx_filename = NULL;
3744  int __pyx_clineno = 0;
3745  __Pyx_TraceFrameInit(__pyx_codeobj__3)
3746  __Pyx_RefNannySetupContext("get_num_parameters", 0);
3747  __Pyx_TraceCall("get_num_parameters", __pyx_f[0], 133, 0, __PYX_ERR(0, 133, __pyx_L1_error));
3748 
3749  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":139
3750  * """
3751  *
3752  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3753  * return self.Aop_float.get_num_parameters()
3754  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3755  */
3756  __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error))
3757  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
3758  __Pyx_GOTREF(__pyx_t_2);
3759  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
3760  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3761  if (__pyx_t_3) {
3762  } else {
3763  __pyx_t_1 = __pyx_t_3;
3764  goto __pyx_L4_bool_binop_done;
3765  }
3766  __pyx_t_3 = ((__pyx_v_self->Aop_float != NULL) != 0);
3767  __pyx_t_1 = __pyx_t_3;
3768  __pyx_L4_bool_binop_done:;
3769  if (__pyx_t_1) {
3770 
3771  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":140
3772  *
3773  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3774  * return self.Aop_float.get_num_parameters() # <<<<<<<<<<<<<<
3775  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3776  * return self.Aop_double.get_num_parameters()
3777  */
3778  __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error))
3779  __Pyx_XDECREF(__pyx_r);
3780  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->Aop_float->get_num_parameters()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
3781  __Pyx_GOTREF(__pyx_t_2);
3782  __pyx_r = __pyx_t_2;
3783  __pyx_t_2 = 0;
3784  goto __pyx_L0;
3785 
3786  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":139
3787  * """
3788  *
3789  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3790  * return self.Aop_float.get_num_parameters()
3791  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3792  */
3793  }
3794 
3795  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":141
3796  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3797  * return self.Aop_float.get_num_parameters()
3798  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3799  * return self.Aop_double.get_num_parameters()
3800  * elif self.data_type_name == b'float128' and \
3801  */
3802  __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error))
3803  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
3804  __Pyx_GOTREF(__pyx_t_2);
3805  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 141, __pyx_L1_error)
3806  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3807  if (__pyx_t_3) {
3808  } else {
3809  __pyx_t_1 = __pyx_t_3;
3810  goto __pyx_L6_bool_binop_done;
3811  }
3812  __pyx_t_3 = ((__pyx_v_self->Aop_double != NULL) != 0);
3813  __pyx_t_1 = __pyx_t_3;
3814  __pyx_L6_bool_binop_done:;
3815  if (__pyx_t_1) {
3816 
3817  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":142
3818  * return self.Aop_float.get_num_parameters()
3819  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3820  * return self.Aop_double.get_num_parameters() # <<<<<<<<<<<<<<
3821  * elif self.data_type_name == b'float128' and \
3822  * self.Aop_long_double != NULL:
3823  */
3824  __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error))
3825  __Pyx_XDECREF(__pyx_r);
3826  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->Aop_double->get_num_parameters()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
3827  __Pyx_GOTREF(__pyx_t_2);
3828  __pyx_r = __pyx_t_2;
3829  __pyx_t_2 = 0;
3830  goto __pyx_L0;
3831 
3832  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":141
3833  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3834  * return self.Aop_float.get_num_parameters()
3835  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3836  * return self.Aop_double.get_num_parameters()
3837  * elif self.data_type_name == b'float128' and \
3838  */
3839  }
3840 
3841  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":143
3842  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3843  * return self.Aop_double.get_num_parameters()
3844  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3845  * self.Aop_long_double != NULL:
3846  * return self.Aop_long_double.get_num_parameters()
3847  */
3848  __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error))
3849  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
3850  __Pyx_GOTREF(__pyx_t_2);
3851  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float128, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 143, __pyx_L1_error)
3852  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3853  if (__pyx_t_3) {
3854  } else {
3855  __pyx_t_1 = __pyx_t_3;
3856  goto __pyx_L8_bool_binop_done;
3857  }
3858 
3859  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":144
3860  * return self.Aop_double.get_num_parameters()
3861  * elif self.data_type_name == b'float128' and \
3862  * self.Aop_long_double != NULL: # <<<<<<<<<<<<<<
3863  * return self.Aop_long_double.get_num_parameters()
3864  * else:
3865  */
3866  __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error))
3867  __pyx_t_3 = ((__pyx_v_self->Aop_long_double != NULL) != 0);
3868  __pyx_t_1 = __pyx_t_3;
3869  __pyx_L8_bool_binop_done:;
3870 
3871  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":143
3872  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3873  * return self.Aop_double.get_num_parameters()
3874  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3875  * self.Aop_long_double != NULL:
3876  * return self.Aop_long_double.get_num_parameters()
3877  */
3878  __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error))
3879  if (likely(__pyx_t_1)) {
3880 
3881  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":145
3882  * elif self.data_type_name == b'float128' and \
3883  * self.Aop_long_double != NULL:
3884  * return self.Aop_long_double.get_num_parameters() # <<<<<<<<<<<<<<
3885  * else:
3886  * raise ValueError('Linear operator is not set.')
3887  */
3888  __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error))
3889  __Pyx_XDECREF(__pyx_r);
3890  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->Aop_long_double->get_num_parameters()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
3891  __Pyx_GOTREF(__pyx_t_2);
3892  __pyx_r = __pyx_t_2;
3893  __pyx_t_2 = 0;
3894  goto __pyx_L0;
3895 
3896  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":143
3897  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3898  * return self.Aop_double.get_num_parameters()
3899  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3900  * self.Aop_long_double != NULL:
3901  * return self.Aop_long_double.get_num_parameters()
3902  */
3903  }
3904 
3905  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":147
3906  * return self.Aop_long_double.get_num_parameters()
3907  * else:
3908  * raise ValueError('Linear operator is not set.') # <<<<<<<<<<<<<<
3909  *
3910  * # ==================
3911  */
3912  __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error))
3913  /*else*/ {
3914  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
3915  __Pyx_GOTREF(__pyx_t_2);
3916  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
3917  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3918  __PYX_ERR(0, 147, __pyx_L1_error)
3919  }
3920 
3921  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":133
3922  * # ==================
3923  *
3924  * def get_num_parameters(self): # <<<<<<<<<<<<<<
3925  * """
3926  * :return: Number of parameters.
3927  */
3928 
3929  /* function exit code */
3930  __pyx_L1_error:;
3931  __Pyx_XDECREF(__pyx_t_2);
3932  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_num_parameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
3933  __pyx_r = NULL;
3934  __pyx_L0:;
3935  __Pyx_XGIVEREF(__pyx_r);
3936  __Pyx_TraceReturn(__pyx_r, 0);
3937  __Pyx_RefNannyFinishContext();
3938  return __pyx_r;
3939 }
3940 
3941 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":153
3942  * # ==================
3943  *
3944  * def get_data_type_name(self): # <<<<<<<<<<<<<<
3945  * """
3946  * """
3947  */
3948 
3949 /* Python wrapper */
3950 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3951 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name[] = "pycLinearOperator.get_data_type_name(self)\n\n ";
3952 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name = {"get_data_type_name", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name};
3953 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3954  PyObject *__pyx_r = 0;
3955  __Pyx_RefNannyDeclarations
3956  __Pyx_RefNannySetupContext("get_data_type_name (wrapper)", 0);
3957  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self));
3958 
3959  /* function exit code */
3960  __Pyx_RefNannyFinishContext();
3961  return __pyx_r;
3962 }
3963 
3964 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
3965  PyObject *__pyx_r = NULL;
3966  __Pyx_TraceDeclarations
3967  __Pyx_RefNannyDeclarations
3968  int __pyx_t_1;
3969  PyObject *__pyx_t_2 = NULL;
3970  int __pyx_lineno = 0;
3971  const char *__pyx_filename = NULL;
3972  int __pyx_clineno = 0;
3973  __Pyx_TraceFrameInit(__pyx_codeobj__4)
3974  __Pyx_RefNannySetupContext("get_data_type_name", 0);
3975  __Pyx_TraceCall("get_data_type_name", __pyx_f[0], 153, 0, __PYX_ERR(0, 153, __pyx_L1_error));
3976 
3977  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":157
3978  * """
3979  *
3980  * if self.data_type_name == NULL: # <<<<<<<<<<<<<<
3981  * raise RuntimeError('Linear operator data type is not set.')
3982  *
3983  */
3984  __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error))
3985  __pyx_t_1 = ((__pyx_v_self->data_type_name == NULL) != 0);
3986  if (unlikely(__pyx_t_1)) {
3987 
3988  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":158
3989  *
3990  * if self.data_type_name == NULL:
3991  * raise RuntimeError('Linear operator data type is not set.') # <<<<<<<<<<<<<<
3992  *
3993  * return self.data_type_name
3994  */
3995  __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error))
3996  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
3997  __Pyx_GOTREF(__pyx_t_2);
3998  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
3999  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4000  __PYX_ERR(0, 158, __pyx_L1_error)
4001 
4002  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":157
4003  * """
4004  *
4005  * if self.data_type_name == NULL: # <<<<<<<<<<<<<<
4006  * raise RuntimeError('Linear operator data type is not set.')
4007  *
4008  */
4009  }
4010 
4011  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":160
4012  * raise RuntimeError('Linear operator data type is not set.')
4013  *
4014  * return self.data_type_name # <<<<<<<<<<<<<<
4015  *
4016  * # =========================
4017  */
4018  __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error))
4019  __Pyx_XDECREF(__pyx_r);
4020  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
4021  __Pyx_GOTREF(__pyx_t_2);
4022  __pyx_r = __pyx_t_2;
4023  __pyx_t_2 = 0;
4024  goto __pyx_L0;
4025 
4026  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":153
4027  * # ==================
4028  *
4029  * def get_data_type_name(self): # <<<<<<<<<<<<<<
4030  * """
4031  * """
4032  */
4033 
4034  /* function exit code */
4035  __pyx_L1_error:;
4036  __Pyx_XDECREF(__pyx_t_2);
4037  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_data_type_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
4038  __pyx_r = NULL;
4039  __pyx_L0:;
4040  __Pyx_XGIVEREF(__pyx_r);
4041  __Pyx_TraceReturn(__pyx_r, 0);
4042  __Pyx_RefNannyFinishContext();
4043  return __pyx_r;
4044 }
4045 
4046 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":166
4047  * # =========================
4048  *
4049  * cdef cLinearOperator[float]* get_linear_operator_float(self) except *: # <<<<<<<<<<<<<<
4050  * """
4051  * """
4052  */
4053 
4054 static cLinearOperator<float> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_float(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
4055  cLinearOperator<float> *__pyx_r;
4056  __Pyx_TraceDeclarations
4057  __Pyx_RefNannyDeclarations
4058  int __pyx_t_1;
4059  PyObject *__pyx_t_2 = NULL;
4060  PyObject *__pyx_t_3 = NULL;
4061  int __pyx_lineno = 0;
4062  const char *__pyx_filename = NULL;
4063  int __pyx_clineno = 0;
4064  __Pyx_RefNannySetupContext("get_linear_operator_float", 0);
4065  __Pyx_TraceCall("get_linear_operator_float", __pyx_f[0], 166, 0, __PYX_ERR(0, 166, __pyx_L1_error));
4066 
4067  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":170
4068  * """
4069  *
4070  * if self.Aop_float == NULL: # <<<<<<<<<<<<<<
4071  * raise RuntimeError('Linear operator (float type) is not set.')
4072  *
4073  */
4074  __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __pyx_L1_error))
4075  __pyx_t_1 = ((__pyx_v_self->Aop_float == NULL) != 0);
4076  if (unlikely(__pyx_t_1)) {
4077 
4078  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":171
4079  *
4080  * if self.Aop_float == NULL:
4081  * raise RuntimeError('Linear operator (float type) is not set.') # <<<<<<<<<<<<<<
4082  *
4083  * if self.data_type_name != b'float32':
4084  */
4085  __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error))
4086  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
4087  __Pyx_GOTREF(__pyx_t_2);
4088  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4089  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4090  __PYX_ERR(0, 171, __pyx_L1_error)
4091 
4092  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":170
4093  * """
4094  *
4095  * if self.Aop_float == NULL: # <<<<<<<<<<<<<<
4096  * raise RuntimeError('Linear operator (float type) is not set.')
4097  *
4098  */
4099  }
4100 
4101  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":173
4102  * raise RuntimeError('Linear operator (float type) is not set.')
4103  *
4104  * if self.data_type_name != b'float32': # <<<<<<<<<<<<<<
4105  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4106  * 'LinearOperator object is: %s'
4107  */
4108  __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L1_error))
4109  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
4110  __Pyx_GOTREF(__pyx_t_2);
4111  __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float32, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
4112  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4113  if (unlikely(__pyx_t_1)) {
4114 
4115  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":176
4116  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4117  * 'LinearOperator object is: %s'
4118  * % self.data_type_name) # <<<<<<<<<<<<<<
4119  *
4120  * return self.Aop_float
4121  */
4122  __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error))
4123  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
4124  __Pyx_GOTREF(__pyx_t_2);
4125  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_LinearOperator_object_is_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
4126  __Pyx_GOTREF(__pyx_t_3);
4127  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4128 
4129  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":174
4130  *
4131  * if self.data_type_name != b'float32':
4132  * raise RuntimeError('Wrong accessors is called. The type of the ' + # <<<<<<<<<<<<<<
4133  * 'LinearOperator object is: %s'
4134  * % self.data_type_name)
4135  */
4136  __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __pyx_L1_error))
4137  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Wrong_accessors_is_called_The_ty, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
4138  __Pyx_GOTREF(__pyx_t_2);
4139  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4140  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)
4141  __Pyx_GOTREF(__pyx_t_3);
4142  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4143  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4144  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4145  __PYX_ERR(0, 174, __pyx_L1_error)
4146 
4147  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":173
4148  * raise RuntimeError('Linear operator (float type) is not set.')
4149  *
4150  * if self.data_type_name != b'float32': # <<<<<<<<<<<<<<
4151  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4152  * 'LinearOperator object is: %s'
4153  */
4154  }
4155 
4156  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":178
4157  * % self.data_type_name)
4158  *
4159  * return self.Aop_float # <<<<<<<<<<<<<<
4160  *
4161  * # ==========================
4162  */
4163  __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error))
4164  __pyx_r = __pyx_v_self->Aop_float;
4165  goto __pyx_L0;
4166 
4167  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":166
4168  * # =========================
4169  *
4170  * cdef cLinearOperator[float]* get_linear_operator_float(self) except *: # <<<<<<<<<<<<<<
4171  * """
4172  * """
4173  */
4174 
4175  /* function exit code */
4176  __pyx_L1_error:;
4177  __Pyx_XDECREF(__pyx_t_2);
4178  __Pyx_XDECREF(__pyx_t_3);
4179  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_linear_operator_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
4180  __pyx_r = 0;
4181  __pyx_L0:;
4182  __Pyx_TraceReturn(Py_None, 0);
4183  __Pyx_RefNannyFinishContext();
4184  return __pyx_r;
4185 }
4186 
4187 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":184
4188  * # ==========================
4189  *
4190  * cdef cLinearOperator[double]* get_linear_operator_double(self) except *: # <<<<<<<<<<<<<<
4191  * """
4192  * """
4193  */
4194 
4195 static cLinearOperator<double> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_double(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
4196  cLinearOperator<double> *__pyx_r;
4197  __Pyx_TraceDeclarations
4198  __Pyx_RefNannyDeclarations
4199  int __pyx_t_1;
4200  PyObject *__pyx_t_2 = NULL;
4201  PyObject *__pyx_t_3 = NULL;
4202  int __pyx_lineno = 0;
4203  const char *__pyx_filename = NULL;
4204  int __pyx_clineno = 0;
4205  __Pyx_RefNannySetupContext("get_linear_operator_double", 0);
4206  __Pyx_TraceCall("get_linear_operator_double", __pyx_f[0], 184, 0, __PYX_ERR(0, 184, __pyx_L1_error));
4207 
4208  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":188
4209  * """
4210  *
4211  * if self.Aop_double == NULL: # <<<<<<<<<<<<<<
4212  * raise RuntimeError('Linear operator (double type) is not set.')
4213  *
4214  */
4215  __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error))
4216  __pyx_t_1 = ((__pyx_v_self->Aop_double == NULL) != 0);
4217  if (unlikely(__pyx_t_1)) {
4218 
4219  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":189
4220  *
4221  * if self.Aop_double == NULL:
4222  * raise RuntimeError('Linear operator (double type) is not set.') # <<<<<<<<<<<<<<
4223  *
4224  * if self.data_type_name != b'float64':
4225  */
4226  __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error))
4227  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
4228  __Pyx_GOTREF(__pyx_t_2);
4229  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4230  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4231  __PYX_ERR(0, 189, __pyx_L1_error)
4232 
4233  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":188
4234  * """
4235  *
4236  * if self.Aop_double == NULL: # <<<<<<<<<<<<<<
4237  * raise RuntimeError('Linear operator (double type) is not set.')
4238  *
4239  */
4240  }
4241 
4242  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":191
4243  * raise RuntimeError('Linear operator (double type) is not set.')
4244  *
4245  * if self.data_type_name != b'float64': # <<<<<<<<<<<<<<
4246  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4247  * 'LinearOperator object is: %s'
4248  */
4249  __Pyx_TraceLine(191,0,__PYX_ERR(0, 191, __pyx_L1_error))
4250  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
4251  __Pyx_GOTREF(__pyx_t_2);
4252  __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float64, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 191, __pyx_L1_error)
4253  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4254  if (unlikely(__pyx_t_1)) {
4255 
4256  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":194
4257  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4258  * 'LinearOperator object is: %s'
4259  * % self.data_type_name) # <<<<<<<<<<<<<<
4260  *
4261  * return self.Aop_double
4262  */
4263  __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error))
4264  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
4265  __Pyx_GOTREF(__pyx_t_2);
4266  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_LinearOperator_object_is_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
4267  __Pyx_GOTREF(__pyx_t_3);
4268  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4269 
4270  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":192
4271  *
4272  * if self.data_type_name != b'float64':
4273  * raise RuntimeError('Wrong accessors is called. The type of the ' + # <<<<<<<<<<<<<<
4274  * 'LinearOperator object is: %s'
4275  * % self.data_type_name)
4276  */
4277  __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __pyx_L1_error))
4278  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Wrong_accessors_is_called_The_ty, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
4279  __Pyx_GOTREF(__pyx_t_2);
4280  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4281  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
4282  __Pyx_GOTREF(__pyx_t_3);
4283  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4284  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4285  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4286  __PYX_ERR(0, 192, __pyx_L1_error)
4287 
4288  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":191
4289  * raise RuntimeError('Linear operator (double type) is not set.')
4290  *
4291  * if self.data_type_name != b'float64': # <<<<<<<<<<<<<<
4292  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4293  * 'LinearOperator object is: %s'
4294  */
4295  }
4296 
4297  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":196
4298  * % self.data_type_name)
4299  *
4300  * return self.Aop_double # <<<<<<<<<<<<<<
4301  *
4302  * # ===============================
4303  */
4304  __Pyx_TraceLine(196,0,__PYX_ERR(0, 196, __pyx_L1_error))
4305  __pyx_r = __pyx_v_self->Aop_double;
4306  goto __pyx_L0;
4307 
4308  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":184
4309  * # ==========================
4310  *
4311  * cdef cLinearOperator[double]* get_linear_operator_double(self) except *: # <<<<<<<<<<<<<<
4312  * """
4313  * """
4314  */
4315 
4316  /* function exit code */
4317  __pyx_L1_error:;
4318  __Pyx_XDECREF(__pyx_t_2);
4319  __Pyx_XDECREF(__pyx_t_3);
4320  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_linear_operator_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
4321  __pyx_r = 0;
4322  __pyx_L0:;
4323  __Pyx_TraceReturn(Py_None, 0);
4324  __Pyx_RefNannyFinishContext();
4325  return __pyx_r;
4326 }
4327 
4328 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":202
4329  * # ===============================
4330  *
4331  * cdef cLinearOperator[long double]* get_linear_operator_long_double( # <<<<<<<<<<<<<<
4332  * self) except*:
4333  * """
4334  */
4335 
4336 static cLinearOperator<long double> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_long_double(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
4338  __Pyx_TraceDeclarations
4339  __Pyx_RefNannyDeclarations
4340  int __pyx_t_1;
4341  PyObject *__pyx_t_2 = NULL;
4342  PyObject *__pyx_t_3 = NULL;
4343  int __pyx_lineno = 0;
4344  const char *__pyx_filename = NULL;
4345  int __pyx_clineno = 0;
4346  __Pyx_RefNannySetupContext("get_linear_operator_long_double", 0);
4347  __Pyx_TraceCall("get_linear_operator_long_double", __pyx_f[0], 202, 0, __PYX_ERR(0, 202, __pyx_L1_error));
4348 
4349  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":207
4350  * """
4351  *
4352  * if self.Aop_long_double == NULL: # <<<<<<<<<<<<<<
4353  * raise RuntimeError('Linear operator (long double type) is not ' +
4354  * 'set.')
4355  */
4356  __Pyx_TraceLine(207,0,__PYX_ERR(0, 207, __pyx_L1_error))
4357  __pyx_t_1 = ((__pyx_v_self->Aop_long_double == NULL) != 0);
4358  if (unlikely(__pyx_t_1)) {
4359 
4360  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":208
4361  *
4362  * if self.Aop_long_double == NULL:
4363  * raise RuntimeError('Linear operator (long double type) is not ' + # <<<<<<<<<<<<<<
4364  * 'set.')
4365  *
4366  */
4367  __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __pyx_L1_error))
4368  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
4369  __Pyx_GOTREF(__pyx_t_2);
4370  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4371  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4372  __PYX_ERR(0, 208, __pyx_L1_error)
4373 
4374  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":207
4375  * """
4376  *
4377  * if self.Aop_long_double == NULL: # <<<<<<<<<<<<<<
4378  * raise RuntimeError('Linear operator (long double type) is not ' +
4379  * 'set.')
4380  */
4381  }
4382 
4383  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":211
4384  * 'set.')
4385  *
4386  * if self.data_type_name != b'float128': # <<<<<<<<<<<<<<
4387  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4388  * 'LinearOperator object is: %s'
4389  */
4390  __Pyx_TraceLine(211,0,__PYX_ERR(0, 211, __pyx_L1_error))
4391  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
4392  __Pyx_GOTREF(__pyx_t_2);
4393  __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float128, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 211, __pyx_L1_error)
4394  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4395  if (unlikely(__pyx_t_1)) {
4396 
4397  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":214
4398  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4399  * 'LinearOperator object is: %s'
4400  * % self.data_type_name) # <<<<<<<<<<<<<<
4401  *
4402  * return self.Aop_long_double
4403  */
4404  __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __pyx_L1_error))
4405  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
4406  __Pyx_GOTREF(__pyx_t_2);
4407  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_LinearOperator_object_is_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error)
4408  __Pyx_GOTREF(__pyx_t_3);
4409  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4410 
4411  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":212
4412  *
4413  * if self.data_type_name != b'float128':
4414  * raise RuntimeError('Wrong accessors is called. The type of the ' + # <<<<<<<<<<<<<<
4415  * 'LinearOperator object is: %s'
4416  * % self.data_type_name)
4417  */
4418  __Pyx_TraceLine(212,0,__PYX_ERR(0, 212, __pyx_L1_error))
4419  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Wrong_accessors_is_called_The_ty, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
4420  __Pyx_GOTREF(__pyx_t_2);
4421  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4422  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error)
4423  __Pyx_GOTREF(__pyx_t_3);
4424  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4425  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4426  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4427  __PYX_ERR(0, 212, __pyx_L1_error)
4428 
4429  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":211
4430  * 'set.')
4431  *
4432  * if self.data_type_name != b'float128': # <<<<<<<<<<<<<<
4433  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4434  * 'LinearOperator object is: %s'
4435  */
4436  }
4437 
4438  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":216
4439  * % self.data_type_name)
4440  *
4441  * return self.Aop_long_double # <<<<<<<<<<<<<<
4442  *
4443  * # ==============
4444  */
4445  __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error))
4446  __pyx_r = __pyx_v_self->Aop_long_double;
4447  goto __pyx_L0;
4448 
4449  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":202
4450  * # ===============================
4451  *
4452  * cdef cLinearOperator[long double]* get_linear_operator_long_double( # <<<<<<<<<<<<<<
4453  * self) except*:
4454  * """
4455  */
4456 
4457  /* function exit code */
4458  __pyx_L1_error:;
4459  __Pyx_XDECREF(__pyx_t_2);
4460  __Pyx_XDECREF(__pyx_t_3);
4461  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_linear_operator_long_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
4462  __pyx_r = 0;
4463  __pyx_L0:;
4464  __Pyx_TraceReturn(Py_None, 0);
4465  __Pyx_RefNannyFinishContext();
4466  return __pyx_r;
4467 }
4468 
4469 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":222
4470  * # ==============
4471  *
4472  * def set_parameters(self, parameters_): # <<<<<<<<<<<<<<
4473  * """
4474  * This function is only used for the test unit of this class. For the
4475  */
4476 
4477 /* Python wrapper */
4478 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters(PyObject *__pyx_v_self, PyObject *__pyx_v_parameters_); /*proto*/
4479 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters[] = "pycLinearOperator.set_parameters(self, parameters_)\n\n This function is only used for the test unit of this class. For the\n actual computations, the parameters are set though ``cLinearOperator``\n object directly, but not by this function.\n ";
4480 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters = {"set_parameters", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters, METH_O, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters};
4481 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters(PyObject *__pyx_v_self, PyObject *__pyx_v_parameters_) {
4482  PyObject *__pyx_r = 0;
4483  __Pyx_RefNannyDeclarations
4484  __Pyx_RefNannySetupContext("set_parameters (wrapper)", 0);
4485  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self), ((PyObject *)__pyx_v_parameters_));
4486 
4487  /* function exit code */
4488  __Pyx_RefNannyFinishContext();
4489  return __pyx_r;
4490 }
4491 
4492 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_parameters_) {
4493  PyObject *__pyx_r = NULL;
4494  __Pyx_TraceDeclarations
4495  __Pyx_RefNannyDeclarations
4496  PyObject *__pyx_t_1 = NULL;
4497  PyObject *__pyx_t_2 = NULL;
4498  PyObject *__pyx_t_3 = NULL;
4499  int __pyx_t_4;
4500  PyObject *__pyx_t_5 = NULL;
4501  int __pyx_lineno = 0;
4502  const char *__pyx_filename = NULL;
4503  int __pyx_clineno = 0;
4504  __Pyx_TraceFrameInit(__pyx_codeobj__9)
4505  __Pyx_RefNannySetupContext("set_parameters", 0);
4506  __Pyx_TraceCall("set_parameters", __pyx_f[0], 222, 0, __PYX_ERR(0, 222, __pyx_L1_error));
4507 
4508  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":229
4509  * """
4510  *
4511  * if numpy.isscalar(parameters_): # <<<<<<<<<<<<<<
4512  * self.parameters = numpy.array([parameters_], dtype=float)
4513  * else:
4514  */
4515  __Pyx_TraceLine(229,0,__PYX_ERR(0, 229, __pyx_L1_error))
4516  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
4517  __Pyx_GOTREF(__pyx_t_2);
4518  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isscalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
4519  __Pyx_GOTREF(__pyx_t_3);
4520  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4521  __pyx_t_2 = NULL;
4522  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4523  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4524  if (likely(__pyx_t_2)) {
4525  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4526  __Pyx_INCREF(__pyx_t_2);
4527  __Pyx_INCREF(function);
4528  __Pyx_DECREF_SET(__pyx_t_3, function);
4529  }
4530  }
4531  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_parameters_) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_parameters_);
4532  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4533  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
4534  __Pyx_GOTREF(__pyx_t_1);
4535  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4536  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 229, __pyx_L1_error)
4537  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4538  if (__pyx_t_4) {
4539 
4540  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":230
4541  *
4542  * if numpy.isscalar(parameters_):
4543  * self.parameters = numpy.array([parameters_], dtype=float) # <<<<<<<<<<<<<<
4544  * else:
4545  * self.parameters = parameters_
4546  */
4547  __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L1_error))
4548  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
4549  __Pyx_GOTREF(__pyx_t_1);
4550  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error)
4551  __Pyx_GOTREF(__pyx_t_3);
4552  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4553  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
4554  __Pyx_GOTREF(__pyx_t_1);
4555  __Pyx_INCREF(__pyx_v_parameters_);
4556  __Pyx_GIVEREF(__pyx_v_parameters_);
4557  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_parameters_);
4558  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
4559  __Pyx_GOTREF(__pyx_t_2);
4560  __Pyx_GIVEREF(__pyx_t_1);
4561  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4562  __pyx_t_1 = 0;
4563  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
4564  __Pyx_GOTREF(__pyx_t_1);
4565  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 230, __pyx_L1_error)
4566  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 230, __pyx_L1_error)
4567  __Pyx_GOTREF(__pyx_t_5);
4568  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4569  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4570  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4571  __Pyx_GIVEREF(__pyx_t_5);
4572  __Pyx_GOTREF(__pyx_v_self->parameters);
4573  __Pyx_DECREF(__pyx_v_self->parameters);
4574  __pyx_v_self->parameters = __pyx_t_5;
4575  __pyx_t_5 = 0;
4576 
4577  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":229
4578  * """
4579  *
4580  * if numpy.isscalar(parameters_): # <<<<<<<<<<<<<<
4581  * self.parameters = numpy.array([parameters_], dtype=float)
4582  * else:
4583  */
4584  goto __pyx_L3;
4585  }
4586 
4587  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":232
4588  * self.parameters = numpy.array([parameters_], dtype=float)
4589  * else:
4590  * self.parameters = parameters_ # <<<<<<<<<<<<<<
4591  *
4592  * # ===
4593  */
4594  __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error))
4595  /*else*/ {
4596  __Pyx_INCREF(__pyx_v_parameters_);
4597  __Pyx_GIVEREF(__pyx_v_parameters_);
4598  __Pyx_GOTREF(__pyx_v_self->parameters);
4599  __Pyx_DECREF(__pyx_v_self->parameters);
4600  __pyx_v_self->parameters = __pyx_v_parameters_;
4601  }
4602  __pyx_L3:;
4603 
4604  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":222
4605  * # ==============
4606  *
4607  * def set_parameters(self, parameters_): # <<<<<<<<<<<<<<
4608  * """
4609  * This function is only used for the test unit of this class. For the
4610  */
4611 
4612  /* function exit code */
4613  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4614  goto __pyx_L0;
4615  __pyx_L1_error:;
4616  __Pyx_XDECREF(__pyx_t_1);
4617  __Pyx_XDECREF(__pyx_t_2);
4618  __Pyx_XDECREF(__pyx_t_3);
4619  __Pyx_XDECREF(__pyx_t_5);
4620  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.set_parameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
4621  __pyx_r = NULL;
4622  __pyx_L0:;
4623  __Pyx_XGIVEREF(__pyx_r);
4624  __Pyx_TraceReturn(__pyx_r, 0);
4625  __Pyx_RefNannyFinishContext();
4626  return __pyx_r;
4627 }
4628 
4629 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":238
4630  * # ===
4631  *
4632  * cpdef void dot(self, vector, product) except *: # <<<<<<<<<<<<<<
4633  * """
4634  * """
4635  */
4636 
4637 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4638 static void __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product, int __pyx_skip_dispatch) {
4639  __Pyx_memviewslice __pyx_v_mv_vector_float = { 0, 0, { 0 }, { 0 }, { 0 } };
4640  __Pyx_memviewslice __pyx_v_mv_vector_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4641  __Pyx_memviewslice __pyx_v_mv_vector_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4642  __Pyx_memviewslice __pyx_v_mv_product_float = { 0, 0, { 0 }, { 0 }, { 0 } };
4643  __Pyx_memviewslice __pyx_v_mv_product_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4644  __Pyx_memviewslice __pyx_v_mv_product_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4645  __Pyx_memviewslice __pyx_v_mv_parameters_float = { 0, 0, { 0 }, { 0 }, { 0 } };
4646  __Pyx_memviewslice __pyx_v_mv_parameters_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4647  __Pyx_memviewslice __pyx_v_mv_parameters_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4648  float *__pyx_v_c_vector_float;
4649  double *__pyx_v_c_vector_double;
4650  long double *__pyx_v_c_vector_long_double;
4651  float *__pyx_v_c_product_float;
4652  double *__pyx_v_c_product_double;
4653  long double *__pyx_v_c_product_long_double;
4654  float *__pyx_v_c_parameters_float;
4655  double *__pyx_v_c_parameters_double;
4656  long double *__pyx_v_c_parameters_long_double;
4657  __Pyx_TraceDeclarations
4658  __Pyx_RefNannyDeclarations
4659  PyObject *__pyx_t_1 = NULL;
4660  PyObject *__pyx_t_2 = NULL;
4661  PyObject *__pyx_t_3 = NULL;
4662  PyObject *__pyx_t_4 = NULL;
4663  int __pyx_t_5;
4664  PyObject *__pyx_t_6 = NULL;
4665  int __pyx_t_7;
4666  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
4667  Py_ssize_t __pyx_t_9;
4668  int __pyx_t_10;
4669  __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
4670  __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
4671  int __pyx_lineno = 0;
4672  const char *__pyx_filename = NULL;
4673  int __pyx_clineno = 0;
4674  __Pyx_TraceFrameInit(__pyx_codeobj__10)
4675  __Pyx_RefNannySetupContext("dot", 0);
4676  __Pyx_TraceCall("dot", __pyx_f[0], 238, 0, __PYX_ERR(0, 238, __pyx_L1_error));
4677  /* Check if called by wrapper */
4678  if (unlikely(__pyx_skip_dispatch)) ;
4679  /* Check if overridden in Python */
4680  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
4681  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
4682  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
4683  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
4684  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
4685  #endif
4686  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
4687  __Pyx_GOTREF(__pyx_t_1);
4688  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot)) {
4689  __Pyx_INCREF(__pyx_t_1);
4690  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
4691  __pyx_t_5 = 0;
4692  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4693  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4694  if (likely(__pyx_t_4)) {
4695  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4696  __Pyx_INCREF(__pyx_t_4);
4697  __Pyx_INCREF(function);
4698  __Pyx_DECREF_SET(__pyx_t_3, function);
4699  __pyx_t_5 = 1;
4700  }
4701  }
4702  #if CYTHON_FAST_PYCALL
4703  if (PyFunction_Check(__pyx_t_3)) {
4704  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_vector, __pyx_v_product};
4705  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
4706  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4707  __Pyx_GOTREF(__pyx_t_2);
4708  } else
4709  #endif
4710  #if CYTHON_FAST_PYCCALL
4711  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
4712  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_vector, __pyx_v_product};
4713  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
4714  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4715  __Pyx_GOTREF(__pyx_t_2);
4716  } else
4717  #endif
4718  {
4719  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error)
4720  __Pyx_GOTREF(__pyx_t_6);
4721  if (__pyx_t_4) {
4722  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
4723  }
4724  __Pyx_INCREF(__pyx_v_vector);
4725  __Pyx_GIVEREF(__pyx_v_vector);
4726  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_vector);
4727  __Pyx_INCREF(__pyx_v_product);
4728  __Pyx_GIVEREF(__pyx_v_product);
4729  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_product);
4730  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
4731  __Pyx_GOTREF(__pyx_t_2);
4732  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4733  }
4734  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4735  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4736  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4737  goto __pyx_L0;
4738  }
4739  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
4740  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
4741  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
4742  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
4743  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
4744  }
4745  #endif
4746  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4747  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
4748  }
4749  #endif
4750  }
4751 
4752  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":242
4753  * """
4754  *
4755  * if vector.dtype != product.dtype: # <<<<<<<<<<<<<<
4756  * raise TypeError('The input vector and product should have ')
4757  *
4758  */
4759  __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __pyx_L1_error))
4760  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
4761  __Pyx_GOTREF(__pyx_t_1);
4762  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_product, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
4763  __Pyx_GOTREF(__pyx_t_2);
4764  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
4765  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4766  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4767  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 242, __pyx_L1_error)
4768  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4769  if (unlikely(__pyx_t_7)) {
4770 
4771  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":243
4772  *
4773  * if vector.dtype != product.dtype:
4774  * raise TypeError('The input vector and product should have ') # <<<<<<<<<<<<<<
4775  *
4776  * # Declare memory views for input vector
4777  */
4778  __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error))
4779  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
4780  __Pyx_GOTREF(__pyx_t_3);
4781  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4782  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4783  __PYX_ERR(0, 243, __pyx_L1_error)
4784 
4785  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":242
4786  * """
4787  *
4788  * if vector.dtype != product.dtype: # <<<<<<<<<<<<<<
4789  * raise TypeError('The input vector and product should have ')
4790  *
4791  */
4792  }
4793 
4794  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":276
4795  *
4796  * # Dispatch to single, double or quadro precision
4797  * if vector.dtype == 'float32': # <<<<<<<<<<<<<<
4798  *
4799  * # input vector
4800  */
4801  __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L1_error))
4802  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
4803  __Pyx_GOTREF(__pyx_t_3);
4804  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float32, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 276, __pyx_L1_error)
4805  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4806  if (__pyx_t_7) {
4807 
4808  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":279
4809  *
4810  * # input vector
4811  * mv_vector_float = vector # <<<<<<<<<<<<<<
4812  * c_vector_float = &mv_vector_float[0]
4813  *
4814  */
4815  __Pyx_TraceLine(279,0,__PYX_ERR(0, 279, __pyx_L1_error))
4816  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 279, __pyx_L1_error)
4817  __pyx_v_mv_vector_float = __pyx_t_8;
4818  __pyx_t_8.memview = NULL;
4819  __pyx_t_8.data = NULL;
4820 
4821  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":280
4822  * # input vector
4823  * mv_vector_float = vector
4824  * c_vector_float = &mv_vector_float[0] # <<<<<<<<<<<<<<
4825  *
4826  * # output product
4827  */
4828  __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L1_error))
4829  __pyx_t_9 = 0;
4830  __pyx_v_c_vector_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_vector_float.data + __pyx_t_9 * __pyx_v_mv_vector_float.strides[0]) ))));
4831 
4832  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":283
4833  *
4834  * # output product
4835  * mv_product_float = product # <<<<<<<<<<<<<<
4836  * c_product_float = &mv_product_float[0]
4837  *
4838  */
4839  __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L1_error))
4840  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 283, __pyx_L1_error)
4841  __pyx_v_mv_product_float = __pyx_t_8;
4842  __pyx_t_8.memview = NULL;
4843  __pyx_t_8.data = NULL;
4844 
4845  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":284
4846  * # output product
4847  * mv_product_float = product
4848  * c_product_float = &mv_product_float[0] # <<<<<<<<<<<<<<
4849  *
4850  * # Set parameters
4851  */
4852  __Pyx_TraceLine(284,0,__PYX_ERR(0, 284, __pyx_L1_error))
4853  __pyx_t_9 = 0;
4854  __pyx_v_c_product_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_product_float.data + __pyx_t_9 * __pyx_v_mv_product_float.strides[0]) ))));
4855 
4856  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":287
4857  *
4858  * # Set parameters
4859  * if self.parameters is not None: # <<<<<<<<<<<<<<
4860  * mv_parameters_float = self.parameters.astype('float32')
4861  * c_parameters_float = &mv_parameters_float[0]
4862  */
4863  __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __pyx_L1_error))
4864  __pyx_t_7 = (__pyx_v_self->parameters != Py_None);
4865  __pyx_t_10 = (__pyx_t_7 != 0);
4866  if (__pyx_t_10) {
4867 
4868  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":288
4869  * # Set parameters
4870  * if self.parameters is not None:
4871  * mv_parameters_float = self.parameters.astype('float32') # <<<<<<<<<<<<<<
4872  * c_parameters_float = &mv_parameters_float[0]
4873  * self.Aop_float.set_parameters(c_parameters_float)
4874  */
4875  __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L1_error))
4876  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error)
4877  __Pyx_GOTREF(__pyx_t_2);
4878  __pyx_t_1 = NULL;
4879  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4880  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
4881  if (likely(__pyx_t_1)) {
4882  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4883  __Pyx_INCREF(__pyx_t_1);
4884  __Pyx_INCREF(function);
4885  __Pyx_DECREF_SET(__pyx_t_2, function);
4886  }
4887  }
4888  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float32) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float32);
4889  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4890  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
4891  __Pyx_GOTREF(__pyx_t_3);
4892  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4893  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 288, __pyx_L1_error)
4894  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4895  __pyx_v_mv_parameters_float = __pyx_t_8;
4896  __pyx_t_8.memview = NULL;
4897  __pyx_t_8.data = NULL;
4898 
4899  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":289
4900  * if self.parameters is not None:
4901  * mv_parameters_float = self.parameters.astype('float32')
4902  * c_parameters_float = &mv_parameters_float[0] # <<<<<<<<<<<<<<
4903  * self.Aop_float.set_parameters(c_parameters_float)
4904  *
4905  */
4906  __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L1_error))
4907  __pyx_t_9 = 0;
4908  __pyx_v_c_parameters_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_parameters_float.data + __pyx_t_9 * __pyx_v_mv_parameters_float.strides[0]) ))));
4909 
4910  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":290
4911  * mv_parameters_float = self.parameters.astype('float32')
4912  * c_parameters_float = &mv_parameters_float[0]
4913  * self.Aop_float.set_parameters(c_parameters_float) # <<<<<<<<<<<<<<
4914  *
4915  * # Call c object
4916  */
4917  __Pyx_TraceLine(290,0,__PYX_ERR(0, 290, __pyx_L1_error))
4918  __pyx_v_self->Aop_float->set_parameters(__pyx_v_c_parameters_float);
4919 
4920  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":287
4921  *
4922  * # Set parameters
4923  * if self.parameters is not None: # <<<<<<<<<<<<<<
4924  * mv_parameters_float = self.parameters.astype('float32')
4925  * c_parameters_float = &mv_parameters_float[0]
4926  */
4927  }
4928 
4929  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":293
4930  *
4931  * # Call c object
4932  * self.Aop_float.dot(c_vector_float, c_product_float) # <<<<<<<<<<<<<<
4933  *
4934  * elif vector.dtype == 'float64':
4935  */
4936  __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __pyx_L1_error))
4937  __pyx_v_self->Aop_float->dot(__pyx_v_c_vector_float, __pyx_v_c_product_float);
4938 
4939  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":276
4940  *
4941  * # Dispatch to single, double or quadro precision
4942  * if vector.dtype == 'float32': # <<<<<<<<<<<<<<
4943  *
4944  * # input vector
4945  */
4946  goto __pyx_L4;
4947  }
4948 
4949  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":295
4950  * self.Aop_float.dot(c_vector_float, c_product_float)
4951  *
4952  * elif vector.dtype == 'float64': # <<<<<<<<<<<<<<
4953  *
4954  * # input vector
4955  */
4956  __Pyx_TraceLine(295,0,__PYX_ERR(0, 295, __pyx_L1_error))
4957  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error)
4958  __Pyx_GOTREF(__pyx_t_3);
4959  __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float64, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 295, __pyx_L1_error)
4960  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4961  if (__pyx_t_10) {
4962 
4963  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":298
4964  *
4965  * # input vector
4966  * mv_vector_double = vector # <<<<<<<<<<<<<<
4967  * c_vector_double = &mv_vector_double[0]
4968  *
4969  */
4970  __Pyx_TraceLine(298,0,__PYX_ERR(0, 298, __pyx_L1_error))
4971  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 298, __pyx_L1_error)
4972  __pyx_v_mv_vector_double = __pyx_t_11;
4973  __pyx_t_11.memview = NULL;
4974  __pyx_t_11.data = NULL;
4975 
4976  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":299
4977  * # input vector
4978  * mv_vector_double = vector
4979  * c_vector_double = &mv_vector_double[0] # <<<<<<<<<<<<<<
4980  *
4981  * # output product
4982  */
4983  __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __pyx_L1_error))
4984  __pyx_t_9 = 0;
4985  __pyx_v_c_vector_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_vector_double.data + __pyx_t_9 * __pyx_v_mv_vector_double.strides[0]) ))));
4986 
4987  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":302
4988  *
4989  * # output product
4990  * mv_product_double = product # <<<<<<<<<<<<<<
4991  * c_product_double = &mv_product_double[0]
4992  *
4993  */
4994  __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error))
4995  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 302, __pyx_L1_error)
4996  __pyx_v_mv_product_double = __pyx_t_11;
4997  __pyx_t_11.memview = NULL;
4998  __pyx_t_11.data = NULL;
4999 
5000  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":303
5001  * # output product
5002  * mv_product_double = product
5003  * c_product_double = &mv_product_double[0] # <<<<<<<<<<<<<<
5004  *
5005  * # Set parameters
5006  */
5007  __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __pyx_L1_error))
5008  __pyx_t_9 = 0;
5009  __pyx_v_c_product_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_product_double.data + __pyx_t_9 * __pyx_v_mv_product_double.strides[0]) ))));
5010 
5011  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":306
5012  *
5013  * # Set parameters
5014  * if self.parameters is not None: # <<<<<<<<<<<<<<
5015  * mv_parameters_double = self.parameters.astype('float64')
5016  * c_parameters_double = &mv_parameters_double[0]
5017  */
5018  __Pyx_TraceLine(306,0,__PYX_ERR(0, 306, __pyx_L1_error))
5019  __pyx_t_10 = (__pyx_v_self->parameters != Py_None);
5020  __pyx_t_7 = (__pyx_t_10 != 0);
5021  if (__pyx_t_7) {
5022 
5023  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":307
5024  * # Set parameters
5025  * if self.parameters is not None:
5026  * mv_parameters_double = self.parameters.astype('float64') # <<<<<<<<<<<<<<
5027  * c_parameters_double = &mv_parameters_double[0]
5028  * self.Aop_double.set_parameters(c_parameters_double)
5029  */
5030  __Pyx_TraceLine(307,0,__PYX_ERR(0, 307, __pyx_L1_error))
5031  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
5032  __Pyx_GOTREF(__pyx_t_2);
5033  __pyx_t_1 = NULL;
5034  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5035  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
5036  if (likely(__pyx_t_1)) {
5037  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5038  __Pyx_INCREF(__pyx_t_1);
5039  __Pyx_INCREF(function);
5040  __Pyx_DECREF_SET(__pyx_t_2, function);
5041  }
5042  }
5043  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float64) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float64);
5044  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5045  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
5046  __Pyx_GOTREF(__pyx_t_3);
5047  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5048  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 307, __pyx_L1_error)
5049  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5050  __pyx_v_mv_parameters_double = __pyx_t_11;
5051  __pyx_t_11.memview = NULL;
5052  __pyx_t_11.data = NULL;
5053 
5054  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":308
5055  * if self.parameters is not None:
5056  * mv_parameters_double = self.parameters.astype('float64')
5057  * c_parameters_double = &mv_parameters_double[0] # <<<<<<<<<<<<<<
5058  * self.Aop_double.set_parameters(c_parameters_double)
5059  *
5060  */
5061  __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error))
5062  __pyx_t_9 = 0;
5063  __pyx_v_c_parameters_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_parameters_double.data + __pyx_t_9 * __pyx_v_mv_parameters_double.strides[0]) ))));
5064 
5065  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":309
5066  * mv_parameters_double = self.parameters.astype('float64')
5067  * c_parameters_double = &mv_parameters_double[0]
5068  * self.Aop_double.set_parameters(c_parameters_double) # <<<<<<<<<<<<<<
5069  *
5070  * # Call c object
5071  */
5072  __Pyx_TraceLine(309,0,__PYX_ERR(0, 309, __pyx_L1_error))
5073  __pyx_v_self->Aop_double->set_parameters(__pyx_v_c_parameters_double);
5074 
5075  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":306
5076  *
5077  * # Set parameters
5078  * if self.parameters is not None: # <<<<<<<<<<<<<<
5079  * mv_parameters_double = self.parameters.astype('float64')
5080  * c_parameters_double = &mv_parameters_double[0]
5081  */
5082  }
5083 
5084  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":312
5085  *
5086  * # Call c object
5087  * self.Aop_double.dot(c_vector_double, c_product_double) # <<<<<<<<<<<<<<
5088  *
5089  * elif vector.dtype == 'float128':
5090  */
5091  __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __pyx_L1_error))
5092  __pyx_v_self->Aop_double->dot(__pyx_v_c_vector_double, __pyx_v_c_product_double);
5093 
5094  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":295
5095  * self.Aop_float.dot(c_vector_float, c_product_float)
5096  *
5097  * elif vector.dtype == 'float64': # <<<<<<<<<<<<<<
5098  *
5099  * # input vector
5100  */
5101  goto __pyx_L4;
5102  }
5103 
5104  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":314
5105  * self.Aop_double.dot(c_vector_double, c_product_double)
5106  *
5107  * elif vector.dtype == 'float128': # <<<<<<<<<<<<<<
5108  *
5109  * # input vector
5110  */
5111  __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L1_error))
5112  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
5113  __Pyx_GOTREF(__pyx_t_3);
5114  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float128, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 314, __pyx_L1_error)
5115  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5116  if (likely(__pyx_t_7)) {
5117 
5118  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":317
5119  *
5120  * # input vector
5121  * mv_vector_long_double = vector # <<<<<<<<<<<<<<
5122  * c_vector_long_double = &mv_vector_long_double[0]
5123  *
5124  */
5125  __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error))
5126  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 317, __pyx_L1_error)
5127  __pyx_v_mv_vector_long_double = __pyx_t_12;
5128  __pyx_t_12.memview = NULL;
5129  __pyx_t_12.data = NULL;
5130 
5131  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":318
5132  * # input vector
5133  * mv_vector_long_double = vector
5134  * c_vector_long_double = &mv_vector_long_double[0] # <<<<<<<<<<<<<<
5135  *
5136  * # output product
5137  */
5138  __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __pyx_L1_error))
5139  __pyx_t_9 = 0;
5140  __pyx_v_c_vector_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_vector_long_double.data + __pyx_t_9 * __pyx_v_mv_vector_long_double.strides[0]) ))));
5141 
5142  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":321
5143  *
5144  * # output product
5145  * mv_product_long_double = product # <<<<<<<<<<<<<<
5146  * c_product_long_double = &mv_product_long_double[0]
5147  *
5148  */
5149  __Pyx_TraceLine(321,0,__PYX_ERR(0, 321, __pyx_L1_error))
5150  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 321, __pyx_L1_error)
5151  __pyx_v_mv_product_long_double = __pyx_t_12;
5152  __pyx_t_12.memview = NULL;
5153  __pyx_t_12.data = NULL;
5154 
5155  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":322
5156  * # output product
5157  * mv_product_long_double = product
5158  * c_product_long_double = &mv_product_long_double[0] # <<<<<<<<<<<<<<
5159  *
5160  * # Set parameters
5161  */
5162  __Pyx_TraceLine(322,0,__PYX_ERR(0, 322, __pyx_L1_error))
5163  __pyx_t_9 = 0;
5164  __pyx_v_c_product_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_product_long_double.data + __pyx_t_9 * __pyx_v_mv_product_long_double.strides[0]) ))));
5165 
5166  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":325
5167  *
5168  * # Set parameters
5169  * if self.parameters is not None: # <<<<<<<<<<<<<<
5170  * mv_parameters_long_double = self.parameters.astype('float128')
5171  * c_parameters_long_double = &mv_parameters_long_double[0]
5172  */
5173  __Pyx_TraceLine(325,0,__PYX_ERR(0, 325, __pyx_L1_error))
5174  __pyx_t_7 = (__pyx_v_self->parameters != Py_None);
5175  __pyx_t_10 = (__pyx_t_7 != 0);
5176  if (__pyx_t_10) {
5177 
5178  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":326
5179  * # Set parameters
5180  * if self.parameters is not None:
5181  * mv_parameters_long_double = self.parameters.astype('float128') # <<<<<<<<<<<<<<
5182  * c_parameters_long_double = &mv_parameters_long_double[0]
5183  * self.Aop_long_double.set_parameters(c_parameters_long_double)
5184  */
5185  __Pyx_TraceLine(326,0,__PYX_ERR(0, 326, __pyx_L1_error))
5186  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
5187  __Pyx_GOTREF(__pyx_t_2);
5188  __pyx_t_1 = NULL;
5189  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5190  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
5191  if (likely(__pyx_t_1)) {
5192  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5193  __Pyx_INCREF(__pyx_t_1);
5194  __Pyx_INCREF(function);
5195  __Pyx_DECREF_SET(__pyx_t_2, function);
5196  }
5197  }
5198  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float128) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float128);
5199  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5200  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error)
5201  __Pyx_GOTREF(__pyx_t_3);
5202  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5203  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 326, __pyx_L1_error)
5204  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5205  __pyx_v_mv_parameters_long_double = __pyx_t_12;
5206  __pyx_t_12.memview = NULL;
5207  __pyx_t_12.data = NULL;
5208 
5209  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":327
5210  * if self.parameters is not None:
5211  * mv_parameters_long_double = self.parameters.astype('float128')
5212  * c_parameters_long_double = &mv_parameters_long_double[0] # <<<<<<<<<<<<<<
5213  * self.Aop_long_double.set_parameters(c_parameters_long_double)
5214  *
5215  */
5216  __Pyx_TraceLine(327,0,__PYX_ERR(0, 327, __pyx_L1_error))
5217  __pyx_t_9 = 0;
5218  __pyx_v_c_parameters_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_parameters_long_double.data + __pyx_t_9 * __pyx_v_mv_parameters_long_double.strides[0]) ))));
5219 
5220  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":328
5221  * mv_parameters_long_double = self.parameters.astype('float128')
5222  * c_parameters_long_double = &mv_parameters_long_double[0]
5223  * self.Aop_long_double.set_parameters(c_parameters_long_double) # <<<<<<<<<<<<<<
5224  *
5225  * # Call c object
5226  */
5227  __Pyx_TraceLine(328,0,__PYX_ERR(0, 328, __pyx_L1_error))
5228  __pyx_v_self->Aop_long_double->set_parameters(__pyx_v_c_parameters_long_double);
5229 
5230  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":325
5231  *
5232  * # Set parameters
5233  * if self.parameters is not None: # <<<<<<<<<<<<<<
5234  * mv_parameters_long_double = self.parameters.astype('float128')
5235  * c_parameters_long_double = &mv_parameters_long_double[0]
5236  */
5237  }
5238 
5239  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":331
5240  *
5241  * # Call c object
5242  * self.Aop_long_double.dot(c_vector_long_double, # <<<<<<<<<<<<<<
5243  * c_product_long_double)
5244  *
5245  */
5246  __Pyx_TraceLine(331,0,__PYX_ERR(0, 331, __pyx_L1_error))
5247  __pyx_v_self->Aop_long_double->dot(__pyx_v_c_vector_long_double, __pyx_v_c_product_long_double);
5248 
5249  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":314
5250  * self.Aop_double.dot(c_vector_double, c_product_double)
5251  *
5252  * elif vector.dtype == 'float128': # <<<<<<<<<<<<<<
5253  *
5254  * # input vector
5255  */
5256  goto __pyx_L4;
5257  }
5258 
5259  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":335
5260  *
5261  * else:
5262  * raise TypeError('Vector type should be either "float32", ' + # <<<<<<<<<<<<<<
5263  * '"float64", or "float128".')
5264  *
5265  */
5266  __Pyx_TraceLine(335,0,__PYX_ERR(0, 335, __pyx_L1_error))
5267  /*else*/ {
5268  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error)
5269  __Pyx_GOTREF(__pyx_t_3);
5270  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5271  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5272  __PYX_ERR(0, 335, __pyx_L1_error)
5273  }
5274  __pyx_L4:;
5275 
5276  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":238
5277  * # ===
5278  *
5279  * cpdef void dot(self, vector, product) except *: # <<<<<<<<<<<<<<
5280  * """
5281  * """
5282  */
5283 
5284  /* function exit code */
5285  goto __pyx_L0;
5286  __pyx_L1_error:;
5287  __Pyx_XDECREF(__pyx_t_1);
5288  __Pyx_XDECREF(__pyx_t_2);
5289  __Pyx_XDECREF(__pyx_t_3);
5290  __Pyx_XDECREF(__pyx_t_4);
5291  __Pyx_XDECREF(__pyx_t_6);
5292  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
5293  __PYX_XDEC_MEMVIEW(&__pyx_t_11, 1);
5294  __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
5295  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
5296  __pyx_L0:;
5297  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_float, 1);
5298  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_double, 1);
5299  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_long_double, 1);
5300  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_float, 1);
5301  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_double, 1);
5302  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_long_double, 1);
5303  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_float, 1);
5304  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_double, 1);
5305  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_long_double, 1);
5306  __Pyx_TraceReturn(Py_None, 0);
5307  __Pyx_RefNannyFinishContext();
5308 }
5309 
5310 /* Python wrapper */
5311 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5312 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_10dot[] = "pycLinearOperator.dot(self, vector, product) -> void\n\n ";
5313 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot = {"dot", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_10dot};
5314 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5315  PyObject *__pyx_v_vector = 0;
5316  PyObject *__pyx_v_product = 0;
5317  int __pyx_lineno = 0;
5318  const char *__pyx_filename = NULL;
5319  int __pyx_clineno = 0;
5320  PyObject *__pyx_r = 0;
5321  __Pyx_RefNannyDeclarations
5322  __Pyx_RefNannySetupContext("dot (wrapper)", 0);
5323  {
5324  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vector,&__pyx_n_s_product,0};
5325  PyObject* values[2] = {0,0};
5326  if (unlikely(__pyx_kwds)) {
5327  Py_ssize_t kw_args;
5328  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5329  switch (pos_args) {
5330  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5331  CYTHON_FALLTHROUGH;
5332  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5333  CYTHON_FALLTHROUGH;
5334  case 0: break;
5335  default: goto __pyx_L5_argtuple_error;
5336  }
5337  kw_args = PyDict_Size(__pyx_kwds);
5338  switch (pos_args) {
5339  case 0:
5340  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vector)) != 0)) kw_args--;
5341  else goto __pyx_L5_argtuple_error;
5342  CYTHON_FALLTHROUGH;
5343  case 1:
5344  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_product)) != 0)) kw_args--;
5345  else {
5346  __Pyx_RaiseArgtupleInvalid("dot", 1, 2, 2, 1); __PYX_ERR(0, 238, __pyx_L3_error)
5347  }
5348  }
5349  if (unlikely(kw_args > 0)) {
5350  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dot") < 0)) __PYX_ERR(0, 238, __pyx_L3_error)
5351  }
5352  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5353  goto __pyx_L5_argtuple_error;
5354  } else {
5355  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5356  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5357  }
5358  __pyx_v_vector = values[0];
5359  __pyx_v_product = values[1];
5360  }
5361  goto __pyx_L4_argument_unpacking_done;
5362  __pyx_L5_argtuple_error:;
5363  __Pyx_RaiseArgtupleInvalid("dot", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 238, __pyx_L3_error)
5364  __pyx_L3_error:;
5365  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
5366  __Pyx_RefNannyFinishContext();
5367  return NULL;
5368  __pyx_L4_argument_unpacking_done:;
5369  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_10dot(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self), __pyx_v_vector, __pyx_v_product);
5370 
5371  /* function exit code */
5372  __Pyx_RefNannyFinishContext();
5373  return __pyx_r;
5374 }
5375 
5376 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_10dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product) {
5377  PyObject *__pyx_r = NULL;
5378  __Pyx_TraceDeclarations
5379  __Pyx_RefNannyDeclarations
5380  PyObject *__pyx_t_1 = NULL;
5381  int __pyx_lineno = 0;
5382  const char *__pyx_filename = NULL;
5383  int __pyx_clineno = 0;
5384  __Pyx_TraceFrameInit(__pyx_codeobj__10)
5385  __Pyx_RefNannySetupContext("dot", 0);
5386  __Pyx_TraceCall("dot (wrapper)", __pyx_f[0], 238, 0, __PYX_ERR(0, 238, __pyx_L1_error));
5387  __Pyx_XDECREF(__pyx_r);
5388  __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_dot(__pyx_v_self, __pyx_v_vector, __pyx_v_product, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 238, __pyx_L1_error)
5389  __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
5390  __Pyx_GOTREF(__pyx_t_1);
5391  __pyx_r = __pyx_t_1;
5392  __pyx_t_1 = 0;
5393  goto __pyx_L0;
5394 
5395  /* function exit code */
5396  __pyx_L1_error:;
5397  __Pyx_XDECREF(__pyx_t_1);
5398  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
5399  __pyx_r = NULL;
5400  __pyx_L0:;
5401  __Pyx_XGIVEREF(__pyx_r);
5402  __Pyx_TraceReturn(__pyx_r, 0);
5403  __Pyx_RefNannyFinishContext();
5404  return __pyx_r;
5405 }
5406 
5407 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":342
5408  * # =============
5409  *
5410  * cpdef void transpose_dot(self, vector, product) except *: # <<<<<<<<<<<<<<
5411  * """
5412  * """
5413  */
5414 
5415 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5416 static void __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_transpose_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product, int __pyx_skip_dispatch) {
5417  __Pyx_memviewslice __pyx_v_mv_vector_float = { 0, 0, { 0 }, { 0 }, { 0 } };
5418  __Pyx_memviewslice __pyx_v_mv_vector_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5419  __Pyx_memviewslice __pyx_v_mv_vector_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5420  __Pyx_memviewslice __pyx_v_mv_product_float = { 0, 0, { 0 }, { 0 }, { 0 } };
5421  __Pyx_memviewslice __pyx_v_mv_product_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5422  __Pyx_memviewslice __pyx_v_mv_product_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5423  __Pyx_memviewslice __pyx_v_mv_parameters_float = { 0, 0, { 0 }, { 0 }, { 0 } };
5424  __Pyx_memviewslice __pyx_v_mv_parameters_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5425  __Pyx_memviewslice __pyx_v_mv_parameters_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5426  float *__pyx_v_c_vector_float;
5427  double *__pyx_v_c_vector_double;
5428  long double *__pyx_v_c_vector_long_double;
5429  float *__pyx_v_c_product_float;
5430  double *__pyx_v_c_product_double;
5431  long double *__pyx_v_c_product_long_double;
5432  float *__pyx_v_c_parameters_float;
5433  double *__pyx_v_c_parameters_double;
5434  long double *__pyx_v_c_parameters_long_double;
5435  __Pyx_TraceDeclarations
5436  __Pyx_RefNannyDeclarations
5437  PyObject *__pyx_t_1 = NULL;
5438  PyObject *__pyx_t_2 = NULL;
5439  PyObject *__pyx_t_3 = NULL;
5440  PyObject *__pyx_t_4 = NULL;
5441  int __pyx_t_5;
5442  PyObject *__pyx_t_6 = NULL;
5443  int __pyx_t_7;
5444  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
5445  Py_ssize_t __pyx_t_9;
5446  int __pyx_t_10;
5447  __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
5448  __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
5449  int __pyx_lineno = 0;
5450  const char *__pyx_filename = NULL;
5451  int __pyx_clineno = 0;
5452  __Pyx_TraceFrameInit(__pyx_codeobj__13)
5453  __Pyx_RefNannySetupContext("transpose_dot", 0);
5454  __Pyx_TraceCall("transpose_dot", __pyx_f[0], 342, 0, __PYX_ERR(0, 342, __pyx_L1_error));
5455  /* Check if called by wrapper */
5456  if (unlikely(__pyx_skip_dispatch)) ;
5457  /* Check if overridden in Python */
5458  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
5459  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
5460  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
5461  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
5462  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
5463  #endif
5464  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_transpose_dot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
5465  __Pyx_GOTREF(__pyx_t_1);
5466  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot)) {
5467  __Pyx_INCREF(__pyx_t_1);
5468  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
5469  __pyx_t_5 = 0;
5470  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5471  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5472  if (likely(__pyx_t_4)) {
5473  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5474  __Pyx_INCREF(__pyx_t_4);
5475  __Pyx_INCREF(function);
5476  __Pyx_DECREF_SET(__pyx_t_3, function);
5477  __pyx_t_5 = 1;
5478  }
5479  }
5480  #if CYTHON_FAST_PYCALL
5481  if (PyFunction_Check(__pyx_t_3)) {
5482  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_vector, __pyx_v_product};
5483  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
5484  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5485  __Pyx_GOTREF(__pyx_t_2);
5486  } else
5487  #endif
5488  #if CYTHON_FAST_PYCCALL
5489  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5490  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_vector, __pyx_v_product};
5491  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
5492  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5493  __Pyx_GOTREF(__pyx_t_2);
5494  } else
5495  #endif
5496  {
5497  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
5498  __Pyx_GOTREF(__pyx_t_6);
5499  if (__pyx_t_4) {
5500  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
5501  }
5502  __Pyx_INCREF(__pyx_v_vector);
5503  __Pyx_GIVEREF(__pyx_v_vector);
5504  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_vector);
5505  __Pyx_INCREF(__pyx_v_product);
5506  __Pyx_GIVEREF(__pyx_v_product);
5507  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_product);
5508  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
5509  __Pyx_GOTREF(__pyx_t_2);
5510  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5511  }
5512  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5513  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5514  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5515  goto __pyx_L0;
5516  }
5517  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
5518  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
5519  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
5520  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
5521  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
5522  }
5523  #endif
5524  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5525  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
5526  }
5527  #endif
5528  }
5529 
5530  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":346
5531  * """
5532  *
5533  * if vector.dtype != product.dtype: # <<<<<<<<<<<<<<
5534  * raise TypeError('The input vector and product should have ')
5535  *
5536  */
5537  __Pyx_TraceLine(346,0,__PYX_ERR(0, 346, __pyx_L1_error))
5538  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
5539  __Pyx_GOTREF(__pyx_t_1);
5540  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_product, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
5541  __Pyx_GOTREF(__pyx_t_2);
5542  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error)
5543  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5544  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5545  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 346, __pyx_L1_error)
5546  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5547  if (unlikely(__pyx_t_7)) {
5548 
5549  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":347
5550  *
5551  * if vector.dtype != product.dtype:
5552  * raise TypeError('The input vector and product should have ') # <<<<<<<<<<<<<<
5553  *
5554  * # Declare memory views for input vector
5555  */
5556  __Pyx_TraceLine(347,0,__PYX_ERR(0, 347, __pyx_L1_error))
5557  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error)
5558  __Pyx_GOTREF(__pyx_t_3);
5559  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5560  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5561  __PYX_ERR(0, 347, __pyx_L1_error)
5562 
5563  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":346
5564  * """
5565  *
5566  * if vector.dtype != product.dtype: # <<<<<<<<<<<<<<
5567  * raise TypeError('The input vector and product should have ')
5568  *
5569  */
5570  }
5571 
5572  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":380
5573  *
5574  * # Dispatch to single, double or quadro precision
5575  * if vector.dtype == 'float32': # <<<<<<<<<<<<<<
5576  *
5577  * # input vector
5578  */
5579  __Pyx_TraceLine(380,0,__PYX_ERR(0, 380, __pyx_L1_error))
5580  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
5581  __Pyx_GOTREF(__pyx_t_3);
5582  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float32, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 380, __pyx_L1_error)
5583  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5584  if (__pyx_t_7) {
5585 
5586  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":383
5587  *
5588  * # input vector
5589  * mv_vector_float = vector # <<<<<<<<<<<<<<
5590  * c_vector_float = &mv_vector_float[0]
5591  *
5592  */
5593  __Pyx_TraceLine(383,0,__PYX_ERR(0, 383, __pyx_L1_error))
5594  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 383, __pyx_L1_error)
5595  __pyx_v_mv_vector_float = __pyx_t_8;
5596  __pyx_t_8.memview = NULL;
5597  __pyx_t_8.data = NULL;
5598 
5599  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":384
5600  * # input vector
5601  * mv_vector_float = vector
5602  * c_vector_float = &mv_vector_float[0] # <<<<<<<<<<<<<<
5603  *
5604  * # output product
5605  */
5606  __Pyx_TraceLine(384,0,__PYX_ERR(0, 384, __pyx_L1_error))
5607  __pyx_t_9 = 0;
5608  __pyx_v_c_vector_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_vector_float.data + __pyx_t_9 * __pyx_v_mv_vector_float.strides[0]) ))));
5609 
5610  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":387
5611  *
5612  * # output product
5613  * mv_product_float = product # <<<<<<<<<<<<<<
5614  * c_product_float = &mv_product_float[0]
5615  *
5616  */
5617  __Pyx_TraceLine(387,0,__PYX_ERR(0, 387, __pyx_L1_error))
5618  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 387, __pyx_L1_error)
5619  __pyx_v_mv_product_float = __pyx_t_8;
5620  __pyx_t_8.memview = NULL;
5621  __pyx_t_8.data = NULL;
5622 
5623  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":388
5624  * # output product
5625  * mv_product_float = product
5626  * c_product_float = &mv_product_float[0] # <<<<<<<<<<<<<<
5627  *
5628  * # Set parameters
5629  */
5630  __Pyx_TraceLine(388,0,__PYX_ERR(0, 388, __pyx_L1_error))
5631  __pyx_t_9 = 0;
5632  __pyx_v_c_product_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_product_float.data + __pyx_t_9 * __pyx_v_mv_product_float.strides[0]) ))));
5633 
5634  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":391
5635  *
5636  * # Set parameters
5637  * if self.parameters is not None: # <<<<<<<<<<<<<<
5638  * mv_parameters_float = self.parameters.astype('float32')
5639  * c_parameters_float = &mv_parameters_float[0]
5640  */
5641  __Pyx_TraceLine(391,0,__PYX_ERR(0, 391, __pyx_L1_error))
5642  __pyx_t_7 = (__pyx_v_self->parameters != Py_None);
5643  __pyx_t_10 = (__pyx_t_7 != 0);
5644  if (__pyx_t_10) {
5645 
5646  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":392
5647  * # Set parameters
5648  * if self.parameters is not None:
5649  * mv_parameters_float = self.parameters.astype('float32') # <<<<<<<<<<<<<<
5650  * c_parameters_float = &mv_parameters_float[0]
5651  * self.Aop_float.set_parameters(c_parameters_float)
5652  */
5653  __Pyx_TraceLine(392,0,__PYX_ERR(0, 392, __pyx_L1_error))
5654  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
5655  __Pyx_GOTREF(__pyx_t_2);
5656  __pyx_t_1 = NULL;
5657  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5658  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
5659  if (likely(__pyx_t_1)) {
5660  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5661  __Pyx_INCREF(__pyx_t_1);
5662  __Pyx_INCREF(function);
5663  __Pyx_DECREF_SET(__pyx_t_2, function);
5664  }
5665  }
5666  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float32) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float32);
5667  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5668  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error)
5669  __Pyx_GOTREF(__pyx_t_3);
5670  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5671  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 392, __pyx_L1_error)
5672  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5673  __pyx_v_mv_parameters_float = __pyx_t_8;
5674  __pyx_t_8.memview = NULL;
5675  __pyx_t_8.data = NULL;
5676 
5677  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":393
5678  * if self.parameters is not None:
5679  * mv_parameters_float = self.parameters.astype('float32')
5680  * c_parameters_float = &mv_parameters_float[0] # <<<<<<<<<<<<<<
5681  * self.Aop_float.set_parameters(c_parameters_float)
5682  *
5683  */
5684  __Pyx_TraceLine(393,0,__PYX_ERR(0, 393, __pyx_L1_error))
5685  __pyx_t_9 = 0;
5686  __pyx_v_c_parameters_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_parameters_float.data + __pyx_t_9 * __pyx_v_mv_parameters_float.strides[0]) ))));
5687 
5688  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":394
5689  * mv_parameters_float = self.parameters.astype('float32')
5690  * c_parameters_float = &mv_parameters_float[0]
5691  * self.Aop_float.set_parameters(c_parameters_float) # <<<<<<<<<<<<<<
5692  *
5693  * # Call c object
5694  */
5695  __Pyx_TraceLine(394,0,__PYX_ERR(0, 394, __pyx_L1_error))
5696  __pyx_v_self->Aop_float->set_parameters(__pyx_v_c_parameters_float);
5697 
5698  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":391
5699  *
5700  * # Set parameters
5701  * if self.parameters is not None: # <<<<<<<<<<<<<<
5702  * mv_parameters_float = self.parameters.astype('float32')
5703  * c_parameters_float = &mv_parameters_float[0]
5704  */
5705  }
5706 
5707  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":397
5708  *
5709  * # Call c object
5710  * self.Aop_float.transpose_dot(c_vector_float, c_product_float) # <<<<<<<<<<<<<<
5711  *
5712  * elif vector.dtype == 'float64':
5713  */
5714  __Pyx_TraceLine(397,0,__PYX_ERR(0, 397, __pyx_L1_error))
5715  __pyx_v_self->Aop_float->transpose_dot(__pyx_v_c_vector_float, __pyx_v_c_product_float);
5716 
5717  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":380
5718  *
5719  * # Dispatch to single, double or quadro precision
5720  * if vector.dtype == 'float32': # <<<<<<<<<<<<<<
5721  *
5722  * # input vector
5723  */
5724  goto __pyx_L4;
5725  }
5726 
5727  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":399
5728  * self.Aop_float.transpose_dot(c_vector_float, c_product_float)
5729  *
5730  * elif vector.dtype == 'float64': # <<<<<<<<<<<<<<
5731  *
5732  * # input vector
5733  */
5734  __Pyx_TraceLine(399,0,__PYX_ERR(0, 399, __pyx_L1_error))
5735  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error)
5736  __Pyx_GOTREF(__pyx_t_3);
5737  __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float64, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 399, __pyx_L1_error)
5738  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5739  if (__pyx_t_10) {
5740 
5741  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":402
5742  *
5743  * # input vector
5744  * mv_vector_double = vector # <<<<<<<<<<<<<<
5745  * c_vector_double = &mv_vector_double[0]
5746  *
5747  */
5748  __Pyx_TraceLine(402,0,__PYX_ERR(0, 402, __pyx_L1_error))
5749  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 402, __pyx_L1_error)
5750  __pyx_v_mv_vector_double = __pyx_t_11;
5751  __pyx_t_11.memview = NULL;
5752  __pyx_t_11.data = NULL;
5753 
5754  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":403
5755  * # input vector
5756  * mv_vector_double = vector
5757  * c_vector_double = &mv_vector_double[0] # <<<<<<<<<<<<<<
5758  *
5759  * # output product
5760  */
5761  __Pyx_TraceLine(403,0,__PYX_ERR(0, 403, __pyx_L1_error))
5762  __pyx_t_9 = 0;
5763  __pyx_v_c_vector_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_vector_double.data + __pyx_t_9 * __pyx_v_mv_vector_double.strides[0]) ))));
5764 
5765  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":406
5766  *
5767  * # output product
5768  * mv_product_double = product # <<<<<<<<<<<<<<
5769  * c_product_double = &mv_product_double[0]
5770  *
5771  */
5772  __Pyx_TraceLine(406,0,__PYX_ERR(0, 406, __pyx_L1_error))
5773  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 406, __pyx_L1_error)
5774  __pyx_v_mv_product_double = __pyx_t_11;
5775  __pyx_t_11.memview = NULL;
5776  __pyx_t_11.data = NULL;
5777 
5778  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":407
5779  * # output product
5780  * mv_product_double = product
5781  * c_product_double = &mv_product_double[0] # <<<<<<<<<<<<<<
5782  *
5783  * # Set parameters
5784  */
5785  __Pyx_TraceLine(407,0,__PYX_ERR(0, 407, __pyx_L1_error))
5786  __pyx_t_9 = 0;
5787  __pyx_v_c_product_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_product_double.data + __pyx_t_9 * __pyx_v_mv_product_double.strides[0]) ))));
5788 
5789  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":410
5790  *
5791  * # Set parameters
5792  * if self.parameters is not None: # <<<<<<<<<<<<<<
5793  * mv_parameters_double = self.parameters.astype('float64')
5794  * c_parameters_double = &mv_parameters_double[0]
5795  */
5796  __Pyx_TraceLine(410,0,__PYX_ERR(0, 410, __pyx_L1_error))
5797  __pyx_t_10 = (__pyx_v_self->parameters != Py_None);
5798  __pyx_t_7 = (__pyx_t_10 != 0);
5799  if (__pyx_t_7) {
5800 
5801  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":411
5802  * # Set parameters
5803  * if self.parameters is not None:
5804  * mv_parameters_double = self.parameters.astype('float64') # <<<<<<<<<<<<<<
5805  * c_parameters_double = &mv_parameters_double[0]
5806  * self.Aop_double.set_parameters(c_parameters_double)
5807  */
5808  __Pyx_TraceLine(411,0,__PYX_ERR(0, 411, __pyx_L1_error))
5809  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
5810  __Pyx_GOTREF(__pyx_t_2);
5811  __pyx_t_1 = NULL;
5812  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5813  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
5814  if (likely(__pyx_t_1)) {
5815  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5816  __Pyx_INCREF(__pyx_t_1);
5817  __Pyx_INCREF(function);
5818  __Pyx_DECREF_SET(__pyx_t_2, function);
5819  }
5820  }
5821  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float64) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float64);
5822  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5823  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
5824  __Pyx_GOTREF(__pyx_t_3);
5825  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5826  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 411, __pyx_L1_error)
5827  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5828  __pyx_v_mv_parameters_double = __pyx_t_11;
5829  __pyx_t_11.memview = NULL;
5830  __pyx_t_11.data = NULL;
5831 
5832  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":412
5833  * if self.parameters is not None:
5834  * mv_parameters_double = self.parameters.astype('float64')
5835  * c_parameters_double = &mv_parameters_double[0] # <<<<<<<<<<<<<<
5836  * self.Aop_double.set_parameters(c_parameters_double)
5837  *
5838  */
5839  __Pyx_TraceLine(412,0,__PYX_ERR(0, 412, __pyx_L1_error))
5840  __pyx_t_9 = 0;
5841  __pyx_v_c_parameters_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_parameters_double.data + __pyx_t_9 * __pyx_v_mv_parameters_double.strides[0]) ))));
5842 
5843  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":413
5844  * mv_parameters_double = self.parameters.astype('float64')
5845  * c_parameters_double = &mv_parameters_double[0]
5846  * self.Aop_double.set_parameters(c_parameters_double) # <<<<<<<<<<<<<<
5847  *
5848  * # Call c object
5849  */
5850  __Pyx_TraceLine(413,0,__PYX_ERR(0, 413, __pyx_L1_error))
5851  __pyx_v_self->Aop_double->set_parameters(__pyx_v_c_parameters_double);
5852 
5853  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":410
5854  *
5855  * # Set parameters
5856  * if self.parameters is not None: # <<<<<<<<<<<<<<
5857  * mv_parameters_double = self.parameters.astype('float64')
5858  * c_parameters_double = &mv_parameters_double[0]
5859  */
5860  }
5861 
5862  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":416
5863  *
5864  * # Call c object
5865  * self.Aop_double.transpose_dot(c_vector_double, c_product_double) # <<<<<<<<<<<<<<
5866  *
5867  * elif vector.dtype == 'float128':
5868  */
5869  __Pyx_TraceLine(416,0,__PYX_ERR(0, 416, __pyx_L1_error))
5870  __pyx_v_self->Aop_double->transpose_dot(__pyx_v_c_vector_double, __pyx_v_c_product_double);
5871 
5872  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":399
5873  * self.Aop_float.transpose_dot(c_vector_float, c_product_float)
5874  *
5875  * elif vector.dtype == 'float64': # <<<<<<<<<<<<<<
5876  *
5877  * # input vector
5878  */
5879  goto __pyx_L4;
5880  }
5881 
5882  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":418
5883  * self.Aop_double.transpose_dot(c_vector_double, c_product_double)
5884  *
5885  * elif vector.dtype == 'float128': # <<<<<<<<<<<<<<
5886  *
5887  * # input vector
5888  */
5889  __Pyx_TraceLine(418,0,__PYX_ERR(0, 418, __pyx_L1_error))
5890  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error)
5891  __Pyx_GOTREF(__pyx_t_3);
5892  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float128, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 418, __pyx_L1_error)
5893  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5894  if (likely(__pyx_t_7)) {
5895 
5896  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":421
5897  *
5898  * # input vector
5899  * mv_vector_long_double = vector # <<<<<<<<<<<<<<
5900  * c_vector_long_double = &mv_vector_long_double[0]
5901  *
5902  */
5903  __Pyx_TraceLine(421,0,__PYX_ERR(0, 421, __pyx_L1_error))
5904  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 421, __pyx_L1_error)
5905  __pyx_v_mv_vector_long_double = __pyx_t_12;
5906  __pyx_t_12.memview = NULL;
5907  __pyx_t_12.data = NULL;
5908 
5909  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":422
5910  * # input vector
5911  * mv_vector_long_double = vector
5912  * c_vector_long_double = &mv_vector_long_double[0] # <<<<<<<<<<<<<<
5913  *
5914  * # output product
5915  */
5916  __Pyx_TraceLine(422,0,__PYX_ERR(0, 422, __pyx_L1_error))
5917  __pyx_t_9 = 0;
5918  __pyx_v_c_vector_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_vector_long_double.data + __pyx_t_9 * __pyx_v_mv_vector_long_double.strides[0]) ))));
5919 
5920  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":425
5921  *
5922  * # output product
5923  * mv_product_long_double = product # <<<<<<<<<<<<<<
5924  * c_product_long_double = &mv_product_long_double[0]
5925  *
5926  */
5927  __Pyx_TraceLine(425,0,__PYX_ERR(0, 425, __pyx_L1_error))
5928  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 425, __pyx_L1_error)
5929  __pyx_v_mv_product_long_double = __pyx_t_12;
5930  __pyx_t_12.memview = NULL;
5931  __pyx_t_12.data = NULL;
5932 
5933  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":426
5934  * # output product
5935  * mv_product_long_double = product
5936  * c_product_long_double = &mv_product_long_double[0] # <<<<<<<<<<<<<<
5937  *
5938  * # Set parameters
5939  */
5940  __Pyx_TraceLine(426,0,__PYX_ERR(0, 426, __pyx_L1_error))
5941  __pyx_t_9 = 0;
5942  __pyx_v_c_product_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_product_long_double.data + __pyx_t_9 * __pyx_v_mv_product_long_double.strides[0]) ))));
5943 
5944  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":429
5945  *
5946  * # Set parameters
5947  * if self.parameters is not None: # <<<<<<<<<<<<<<
5948  * mv_parameters_long_double = self.parameters.astype('float128')
5949  * c_parameters_long_double = &mv_parameters_long_double[0]
5950  */
5951  __Pyx_TraceLine(429,0,__PYX_ERR(0, 429, __pyx_L1_error))
5952  __pyx_t_7 = (__pyx_v_self->parameters != Py_None);
5953  __pyx_t_10 = (__pyx_t_7 != 0);
5954  if (__pyx_t_10) {
5955 
5956  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":430
5957  * # Set parameters
5958  * if self.parameters is not None:
5959  * mv_parameters_long_double = self.parameters.astype('float128') # <<<<<<<<<<<<<<
5960  * c_parameters_long_double = &mv_parameters_long_double[0]
5961  * self.Aop_long_double.set_parameters(c_parameters_long_double)
5962  */
5963  __Pyx_TraceLine(430,0,__PYX_ERR(0, 430, __pyx_L1_error))
5964  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error)
5965  __Pyx_GOTREF(__pyx_t_2);
5966  __pyx_t_1 = NULL;
5967  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5968  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
5969  if (likely(__pyx_t_1)) {
5970  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5971  __Pyx_INCREF(__pyx_t_1);
5972  __Pyx_INCREF(function);
5973  __Pyx_DECREF_SET(__pyx_t_2, function);
5974  }
5975  }
5976  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float128) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float128);
5977  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5978  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error)
5979  __Pyx_GOTREF(__pyx_t_3);
5980  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5981  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 430, __pyx_L1_error)
5982  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5983  __pyx_v_mv_parameters_long_double = __pyx_t_12;
5984  __pyx_t_12.memview = NULL;
5985  __pyx_t_12.data = NULL;
5986 
5987  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":431
5988  * if self.parameters is not None:
5989  * mv_parameters_long_double = self.parameters.astype('float128')
5990  * c_parameters_long_double = &mv_parameters_long_double[0] # <<<<<<<<<<<<<<
5991  * self.Aop_long_double.set_parameters(c_parameters_long_double)
5992  *
5993  */
5994  __Pyx_TraceLine(431,0,__PYX_ERR(0, 431, __pyx_L1_error))
5995  __pyx_t_9 = 0;
5996  __pyx_v_c_parameters_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_parameters_long_double.data + __pyx_t_9 * __pyx_v_mv_parameters_long_double.strides[0]) ))));
5997 
5998  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":432
5999  * mv_parameters_long_double = self.parameters.astype('float128')
6000  * c_parameters_long_double = &mv_parameters_long_double[0]
6001  * self.Aop_long_double.set_parameters(c_parameters_long_double) # <<<<<<<<<<<<<<
6002  *
6003  * # Call c object
6004  */
6005  __Pyx_TraceLine(432,0,__PYX_ERR(0, 432, __pyx_L1_error))
6006  __pyx_v_self->Aop_long_double->set_parameters(__pyx_v_c_parameters_long_double);
6007 
6008  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":429
6009  *
6010  * # Set parameters
6011  * if self.parameters is not None: # <<<<<<<<<<<<<<
6012  * mv_parameters_long_double = self.parameters.astype('float128')
6013  * c_parameters_long_double = &mv_parameters_long_double[0]
6014  */
6015  }
6016 
6017  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":435
6018  *
6019  * # Call c object
6020  * self.Aop_long_double.transpose_dot(c_vector_long_double, # <<<<<<<<<<<<<<
6021  * c_product_long_double)
6022  *
6023  */
6024  __Pyx_TraceLine(435,0,__PYX_ERR(0, 435, __pyx_L1_error))
6025  __pyx_v_self->Aop_long_double->transpose_dot(__pyx_v_c_vector_long_double, __pyx_v_c_product_long_double);
6026 
6027  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":418
6028  * self.Aop_double.transpose_dot(c_vector_double, c_product_double)
6029  *
6030  * elif vector.dtype == 'float128': # <<<<<<<<<<<<<<
6031  *
6032  * # input vector
6033  */
6034  goto __pyx_L4;
6035  }
6036 
6037  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":439
6038  *
6039  * else:
6040  * raise TypeError('Vector type should be either "float32", ' + # <<<<<<<<<<<<<<
6041  * '"float64", or "float128".')
6042  */
6043  __Pyx_TraceLine(439,0,__PYX_ERR(0, 439, __pyx_L1_error))
6044  /*else*/ {
6045  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error)
6046  __Pyx_GOTREF(__pyx_t_3);
6047  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6048  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6049  __PYX_ERR(0, 439, __pyx_L1_error)
6050  }
6051  __pyx_L4:;
6052 
6053  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":342
6054  * # =============
6055  *
6056  * cpdef void transpose_dot(self, vector, product) except *: # <<<<<<<<<<<<<<
6057  * """
6058  * """
6059  */
6060 
6061  /* function exit code */
6062  goto __pyx_L0;
6063  __pyx_L1_error:;
6064  __Pyx_XDECREF(__pyx_t_1);
6065  __Pyx_XDECREF(__pyx_t_2);
6066  __Pyx_XDECREF(__pyx_t_3);
6067  __Pyx_XDECREF(__pyx_t_4);
6068  __Pyx_XDECREF(__pyx_t_6);
6069  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
6070  __PYX_XDEC_MEMVIEW(&__pyx_t_11, 1);
6071  __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
6072  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.transpose_dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
6073  __pyx_L0:;
6074  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_float, 1);
6075  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_double, 1);
6076  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_long_double, 1);
6077  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_float, 1);
6078  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_double, 1);
6079  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_long_double, 1);
6080  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_float, 1);
6081  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_double, 1);
6082  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_long_double, 1);
6083  __Pyx_TraceReturn(Py_None, 0);
6084  __Pyx_RefNannyFinishContext();
6085 }
6086 
6087 /* Python wrapper */
6088 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6089 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_12transpose_dot[] = "pycLinearOperator.transpose_dot(self, vector, product) -> void\n\n ";
6090 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot = {"transpose_dot", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_12transpose_dot};
6091 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6092  PyObject *__pyx_v_vector = 0;
6093  PyObject *__pyx_v_product = 0;
6094  int __pyx_lineno = 0;
6095  const char *__pyx_filename = NULL;
6096  int __pyx_clineno = 0;
6097  PyObject *__pyx_r = 0;
6098  __Pyx_RefNannyDeclarations
6099  __Pyx_RefNannySetupContext("transpose_dot (wrapper)", 0);
6100  {
6101  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vector,&__pyx_n_s_product,0};
6102  PyObject* values[2] = {0,0};
6103  if (unlikely(__pyx_kwds)) {
6104  Py_ssize_t kw_args;
6105  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6106  switch (pos_args) {
6107  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6108  CYTHON_FALLTHROUGH;
6109  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6110  CYTHON_FALLTHROUGH;
6111  case 0: break;
6112  default: goto __pyx_L5_argtuple_error;
6113  }
6114  kw_args = PyDict_Size(__pyx_kwds);
6115  switch (pos_args) {
6116  case 0:
6117  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vector)) != 0)) kw_args--;
6118  else goto __pyx_L5_argtuple_error;
6119  CYTHON_FALLTHROUGH;
6120  case 1:
6121  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_product)) != 0)) kw_args--;
6122  else {
6123  __Pyx_RaiseArgtupleInvalid("transpose_dot", 1, 2, 2, 1); __PYX_ERR(0, 342, __pyx_L3_error)
6124  }
6125  }
6126  if (unlikely(kw_args > 0)) {
6127  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transpose_dot") < 0)) __PYX_ERR(0, 342, __pyx_L3_error)
6128  }
6129  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
6130  goto __pyx_L5_argtuple_error;
6131  } else {
6132  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6133  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6134  }
6135  __pyx_v_vector = values[0];
6136  __pyx_v_product = values[1];
6137  }
6138  goto __pyx_L4_argument_unpacking_done;
6139  __pyx_L5_argtuple_error:;
6140  __Pyx_RaiseArgtupleInvalid("transpose_dot", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 342, __pyx_L3_error)
6141  __pyx_L3_error:;
6142  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.transpose_dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
6143  __Pyx_RefNannyFinishContext();
6144  return NULL;
6145  __pyx_L4_argument_unpacking_done:;
6146  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_12transpose_dot(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self), __pyx_v_vector, __pyx_v_product);
6147 
6148  /* function exit code */
6149  __Pyx_RefNannyFinishContext();
6150  return __pyx_r;
6151 }
6152 
6153 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_12transpose_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product) {
6154  PyObject *__pyx_r = NULL;
6155  __Pyx_TraceDeclarations
6156  __Pyx_RefNannyDeclarations
6157  PyObject *__pyx_t_1 = NULL;
6158  int __pyx_lineno = 0;
6159  const char *__pyx_filename = NULL;
6160  int __pyx_clineno = 0;
6161  __Pyx_TraceFrameInit(__pyx_codeobj__13)
6162  __Pyx_RefNannySetupContext("transpose_dot", 0);
6163  __Pyx_TraceCall("transpose_dot (wrapper)", __pyx_f[0], 342, 0, __PYX_ERR(0, 342, __pyx_L1_error));
6164  __Pyx_XDECREF(__pyx_r);
6165  __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_transpose_dot(__pyx_v_self, __pyx_v_vector, __pyx_v_product, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error)
6166  __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
6167  __Pyx_GOTREF(__pyx_t_1);
6168  __pyx_r = __pyx_t_1;
6169  __pyx_t_1 = 0;
6170  goto __pyx_L0;
6171 
6172  /* function exit code */
6173  __pyx_L1_error:;
6174  __Pyx_XDECREF(__pyx_t_1);
6175  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.transpose_dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
6176  __pyx_r = NULL;
6177  __pyx_L0:;
6178  __Pyx_XGIVEREF(__pyx_r);
6179  __Pyx_TraceReturn(__pyx_r, 0);
6180  __Pyx_RefNannyFinishContext();
6181  return __pyx_r;
6182 }
6183 
6184 /* "(tree fragment)":1
6185  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6186  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6187  * def __setstate_cython__(self, __pyx_state):
6188  */
6189 
6190 /* Python wrapper */
6191 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6192 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__[] = "pycLinearOperator.__reduce_cython__(self)";
6193 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__};
6194 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6195  PyObject *__pyx_r = 0;
6196  __Pyx_RefNannyDeclarations
6197  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
6198  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self));
6199 
6200  /* function exit code */
6201  __Pyx_RefNannyFinishContext();
6202  return __pyx_r;
6203 }
6204 
6205 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
6206  PyObject *__pyx_r = NULL;
6207  __Pyx_TraceDeclarations
6208  __Pyx_RefNannyDeclarations
6209  PyObject *__pyx_t_1 = NULL;
6210  int __pyx_lineno = 0;
6211  const char *__pyx_filename = NULL;
6212  int __pyx_clineno = 0;
6213  __Pyx_TraceFrameInit(__pyx_codeobj__14)
6214  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
6215  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
6216 
6217  /* "(tree fragment)":2
6218  * def __reduce_cython__(self):
6219  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
6220  * def __setstate_cython__(self, __pyx_state):
6221  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6222  */
6223  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
6224  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
6225  __Pyx_GOTREF(__pyx_t_1);
6226  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6227  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6228  __PYX_ERR(1, 2, __pyx_L1_error)
6229 
6230  /* "(tree fragment)":1
6231  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6232  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6233  * def __setstate_cython__(self, __pyx_state):
6234  */
6235 
6236  /* function exit code */
6237  __pyx_L1_error:;
6238  __Pyx_XDECREF(__pyx_t_1);
6239  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6240  __pyx_r = NULL;
6241  __Pyx_XGIVEREF(__pyx_r);
6242  __Pyx_TraceReturn(__pyx_r, 0);
6243  __Pyx_RefNannyFinishContext();
6244  return __pyx_r;
6245 }
6246 
6247 /* "(tree fragment)":3
6248  * def __reduce_cython__(self):
6249  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6250  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6251  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6252  */
6253 
6254 /* Python wrapper */
6255 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
6256 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__[] = "pycLinearOperator.__setstate_cython__(self, __pyx_state)";
6257 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__, METH_O, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__};
6258 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
6259  PyObject *__pyx_r = 0;
6260  __Pyx_RefNannyDeclarations
6261  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
6262  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
6263 
6264  /* function exit code */
6265  __Pyx_RefNannyFinishContext();
6266  return __pyx_r;
6267 }
6268 
6269 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
6270  PyObject *__pyx_r = NULL;
6271  __Pyx_TraceDeclarations
6272  __Pyx_RefNannyDeclarations
6273  PyObject *__pyx_t_1 = NULL;
6274  int __pyx_lineno = 0;
6275  const char *__pyx_filename = NULL;
6276  int __pyx_clineno = 0;
6277  __Pyx_TraceFrameInit(__pyx_codeobj__16)
6278  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
6279  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
6280 
6281  /* "(tree fragment)":4
6282  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6283  * def __setstate_cython__(self, __pyx_state):
6284  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
6285  */
6286  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
6287  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
6288  __Pyx_GOTREF(__pyx_t_1);
6289  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6290  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6291  __PYX_ERR(1, 4, __pyx_L1_error)
6292 
6293  /* "(tree fragment)":3
6294  * def __reduce_cython__(self):
6295  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6296  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6297  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6298  */
6299 
6300  /* function exit code */
6301  __pyx_L1_error:;
6302  __Pyx_XDECREF(__pyx_t_1);
6303  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6304  __pyx_r = NULL;
6305  __Pyx_XGIVEREF(__pyx_r);
6306  __Pyx_TraceReturn(__pyx_r, 0);
6307  __Pyx_RefNannyFinishContext();
6308  return __pyx_r;
6309 }
6310 
6311 /* "View.MemoryView":123
6312  * cdef bint dtype_is_object
6313  *
6314  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
6315  * mode="c", bint allocate_buffer=True):
6316  *
6317  */
6318 
6319 /* Python wrapper */
6320 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6321 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6322  PyObject *__pyx_v_shape = 0;
6323  Py_ssize_t __pyx_v_itemsize;
6324  PyObject *__pyx_v_format = 0;
6325  PyObject *__pyx_v_mode = 0;
6326  int __pyx_v_allocate_buffer;
6327  int __pyx_lineno = 0;
6328  const char *__pyx_filename = NULL;
6329  int __pyx_clineno = 0;
6330  int __pyx_r;
6331  __Pyx_RefNannyDeclarations
6332  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6333  {
6334  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
6335  PyObject* values[5] = {0,0,0,0,0};
6336  values[3] = ((PyObject *)__pyx_n_s_c);
6337  if (unlikely(__pyx_kwds)) {
6338  Py_ssize_t kw_args;
6339  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6340  switch (pos_args) {
6341  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6342  CYTHON_FALLTHROUGH;
6343  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6344  CYTHON_FALLTHROUGH;
6345  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6346  CYTHON_FALLTHROUGH;
6347  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6348  CYTHON_FALLTHROUGH;
6349  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6350  CYTHON_FALLTHROUGH;
6351  case 0: break;
6352  default: goto __pyx_L5_argtuple_error;
6353  }
6354  kw_args = PyDict_Size(__pyx_kwds);
6355  switch (pos_args) {
6356  case 0:
6357  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
6358  else goto __pyx_L5_argtuple_error;
6359  CYTHON_FALLTHROUGH;
6360  case 1:
6361  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
6362  else {
6363  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 123, __pyx_L3_error)
6364  }
6365  CYTHON_FALLTHROUGH;
6366  case 2:
6367  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
6368  else {
6369  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 123, __pyx_L3_error)
6370  }
6371  CYTHON_FALLTHROUGH;
6372  case 3:
6373  if (kw_args > 0) {
6374  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
6375  if (value) { values[3] = value; kw_args--; }
6376  }
6377  CYTHON_FALLTHROUGH;
6378  case 4:
6379  if (kw_args > 0) {
6380  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
6381  if (value) { values[4] = value; kw_args--; }
6382  }
6383  }
6384  if (unlikely(kw_args > 0)) {
6385  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 123, __pyx_L3_error)
6386  }
6387  } else {
6388  switch (PyTuple_GET_SIZE(__pyx_args)) {
6389  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6390  CYTHON_FALLTHROUGH;
6391  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6392  CYTHON_FALLTHROUGH;
6393  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6394  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6395  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6396  break;
6397  default: goto __pyx_L5_argtuple_error;
6398  }
6399  }
6400  __pyx_v_shape = ((PyObject*)values[0]);
6401  __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L3_error)
6402  __pyx_v_format = values[2];
6403  __pyx_v_mode = values[3];
6404  if (values[4]) {
6405  __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 124, __pyx_L3_error)
6406  } else {
6407 
6408  /* "View.MemoryView":124
6409  *
6410  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
6411  * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
6412  *
6413  * cdef int idx
6414  */
6415  __pyx_v_allocate_buffer = ((int)1);
6416  }
6417  }
6418  goto __pyx_L4_argument_unpacking_done;
6419  __pyx_L5_argtuple_error:;
6420  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 123, __pyx_L3_error)
6421  __pyx_L3_error:;
6422  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6423  __Pyx_RefNannyFinishContext();
6424  return -1;
6425  __pyx_L4_argument_unpacking_done:;
6426  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 123, __pyx_L1_error)
6427  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
6428  PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 123, __pyx_L1_error)
6429  }
6430  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
6431 
6432  /* "View.MemoryView":123
6433  * cdef bint dtype_is_object
6434  *
6435  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
6436  * mode="c", bint allocate_buffer=True):
6437  *
6438  */
6439 
6440  /* function exit code */
6441  goto __pyx_L0;
6442  __pyx_L1_error:;
6443  __pyx_r = -1;
6444  __pyx_L0:;
6445  __Pyx_RefNannyFinishContext();
6446  return __pyx_r;
6447 }
6448 
6449 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
6450  int __pyx_v_idx;
6451  Py_ssize_t __pyx_v_i;
6452  Py_ssize_t __pyx_v_dim;
6453  PyObject **__pyx_v_p;
6454  char __pyx_v_order;
6455  int __pyx_r;
6456  __Pyx_TraceDeclarations
6457  __Pyx_RefNannyDeclarations
6458  Py_ssize_t __pyx_t_1;
6459  int __pyx_t_2;
6460  PyObject *__pyx_t_3 = NULL;
6461  int __pyx_t_4;
6462  PyObject *__pyx_t_5 = NULL;
6463  PyObject *__pyx_t_6 = NULL;
6464  char *__pyx_t_7;
6465  int __pyx_t_8;
6466  Py_ssize_t __pyx_t_9;
6467  PyObject *__pyx_t_10 = NULL;
6468  Py_ssize_t __pyx_t_11;
6469  int __pyx_lineno = 0;
6470  const char *__pyx_filename = NULL;
6471  int __pyx_clineno = 0;
6472  __Pyx_RefNannySetupContext("__cinit__", 0);
6473  __Pyx_TraceCall("__cinit__", __pyx_f[1], 123, 0, __PYX_ERR(1, 123, __pyx_L1_error));
6474  __Pyx_INCREF(__pyx_v_format);
6475 
6476  /* "View.MemoryView":130
6477  * cdef PyObject **p
6478  *
6479  * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
6480  * self.itemsize = itemsize
6481  *
6482  */
6483  __Pyx_TraceLine(130,0,__PYX_ERR(1, 130, __pyx_L1_error))
6484  if (unlikely(__pyx_v_shape == Py_None)) {
6485  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
6486  __PYX_ERR(1, 130, __pyx_L1_error)
6487  }
6488  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 130, __pyx_L1_error)
6489  __pyx_v_self->ndim = ((int)__pyx_t_1);
6490 
6491  /* "View.MemoryView":131
6492  *
6493  * self.ndim = <int> len(shape)
6494  * self.itemsize = itemsize # <<<<<<<<<<<<<<
6495  *
6496  * if not self.ndim:
6497  */
6498  __Pyx_TraceLine(131,0,__PYX_ERR(1, 131, __pyx_L1_error))
6499  __pyx_v_self->itemsize = __pyx_v_itemsize;
6500 
6501  /* "View.MemoryView":133
6502  * self.itemsize = itemsize
6503  *
6504  * if not self.ndim: # <<<<<<<<<<<<<<
6505  * raise ValueError("Empty shape tuple for cython.array")
6506  *
6507  */
6508  __Pyx_TraceLine(133,0,__PYX_ERR(1, 133, __pyx_L1_error))
6509  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
6510  if (unlikely(__pyx_t_2)) {
6511 
6512  /* "View.MemoryView":134
6513  *
6514  * if not self.ndim:
6515  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
6516  *
6517  * if itemsize <= 0:
6518  */
6519  __Pyx_TraceLine(134,0,__PYX_ERR(1, 134, __pyx_L1_error))
6520  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 134, __pyx_L1_error)
6521  __Pyx_GOTREF(__pyx_t_3);
6522  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6523  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6524  __PYX_ERR(1, 134, __pyx_L1_error)
6525 
6526  /* "View.MemoryView":133
6527  * self.itemsize = itemsize
6528  *
6529  * if not self.ndim: # <<<<<<<<<<<<<<
6530  * raise ValueError("Empty shape tuple for cython.array")
6531  *
6532  */
6533  }
6534 
6535  /* "View.MemoryView":136
6536  * raise ValueError("Empty shape tuple for cython.array")
6537  *
6538  * if itemsize <= 0: # <<<<<<<<<<<<<<
6539  * raise ValueError("itemsize <= 0 for cython.array")
6540  *
6541  */
6542  __Pyx_TraceLine(136,0,__PYX_ERR(1, 136, __pyx_L1_error))
6543  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
6544  if (unlikely(__pyx_t_2)) {
6545 
6546  /* "View.MemoryView":137
6547  *
6548  * if itemsize <= 0:
6549  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
6550  *
6551  * if not isinstance(format, bytes):
6552  */
6553  __Pyx_TraceLine(137,0,__PYX_ERR(1, 137, __pyx_L1_error))
6554  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 137, __pyx_L1_error)
6555  __Pyx_GOTREF(__pyx_t_3);
6556  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6557  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6558  __PYX_ERR(1, 137, __pyx_L1_error)
6559 
6560  /* "View.MemoryView":136
6561  * raise ValueError("Empty shape tuple for cython.array")
6562  *
6563  * if itemsize <= 0: # <<<<<<<<<<<<<<
6564  * raise ValueError("itemsize <= 0 for cython.array")
6565  *
6566  */
6567  }
6568 
6569  /* "View.MemoryView":139
6570  * raise ValueError("itemsize <= 0 for cython.array")
6571  *
6572  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
6573  * format = format.encode('ASCII')
6574  * self._format = format # keep a reference to the byte string
6575  */
6576  __Pyx_TraceLine(139,0,__PYX_ERR(1, 139, __pyx_L1_error))
6577  __pyx_t_2 = PyBytes_Check(__pyx_v_format);
6578  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
6579  if (__pyx_t_4) {
6580 
6581  /* "View.MemoryView":140
6582  *
6583  * if not isinstance(format, bytes):
6584  * format = format.encode('ASCII') # <<<<<<<<<<<<<<
6585  * self._format = format # keep a reference to the byte string
6586  * self.format = self._format
6587  */
6588  __Pyx_TraceLine(140,0,__PYX_ERR(1, 140, __pyx_L1_error))
6589  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 140, __pyx_L1_error)
6590  __Pyx_GOTREF(__pyx_t_5);
6591  __pyx_t_6 = NULL;
6592  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
6593  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
6594  if (likely(__pyx_t_6)) {
6595  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6596  __Pyx_INCREF(__pyx_t_6);
6597  __Pyx_INCREF(function);
6598  __Pyx_DECREF_SET(__pyx_t_5, function);
6599  }
6600  }
6601  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
6602  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6603  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 140, __pyx_L1_error)
6604  __Pyx_GOTREF(__pyx_t_3);
6605  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6606  __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
6607  __pyx_t_3 = 0;
6608 
6609  /* "View.MemoryView":139
6610  * raise ValueError("itemsize <= 0 for cython.array")
6611  *
6612  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
6613  * format = format.encode('ASCII')
6614  * self._format = format # keep a reference to the byte string
6615  */
6616  }
6617 
6618  /* "View.MemoryView":141
6619  * if not isinstance(format, bytes):
6620  * format = format.encode('ASCII')
6621  * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
6622  * self.format = self._format
6623  *
6624  */
6625  __Pyx_TraceLine(141,0,__PYX_ERR(1, 141, __pyx_L1_error))
6626  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(1, 141, __pyx_L1_error)
6627  __pyx_t_3 = __pyx_v_format;
6628  __Pyx_INCREF(__pyx_t_3);
6629  __Pyx_GIVEREF(__pyx_t_3);
6630  __Pyx_GOTREF(__pyx_v_self->_format);
6631  __Pyx_DECREF(__pyx_v_self->_format);
6632  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
6633  __pyx_t_3 = 0;
6634 
6635  /* "View.MemoryView":142
6636  * format = format.encode('ASCII')
6637  * self._format = format # keep a reference to the byte string
6638  * self.format = self._format # <<<<<<<<<<<<<<
6639  *
6640  *
6641  */
6642  __Pyx_TraceLine(142,0,__PYX_ERR(1, 142, __pyx_L1_error))
6643  if (unlikely(__pyx_v_self->_format == Py_None)) {
6644  PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
6645  __PYX_ERR(1, 142, __pyx_L1_error)
6646  }
6647  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 142, __pyx_L1_error)
6648  __pyx_v_self->format = __pyx_t_7;
6649 
6650  /* "View.MemoryView":145
6651  *
6652  *
6653  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
6654  * self._strides = self._shape + self.ndim
6655  *
6656  */
6657  __Pyx_TraceLine(145,0,__PYX_ERR(1, 145, __pyx_L1_error))
6658  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
6659 
6660  /* "View.MemoryView":146
6661  *
6662  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
6663  * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
6664  *
6665  * if not self._shape:
6666  */
6667  __Pyx_TraceLine(146,0,__PYX_ERR(1, 146, __pyx_L1_error))
6668  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
6669 
6670  /* "View.MemoryView":148
6671  * self._strides = self._shape + self.ndim
6672  *
6673  * if not self._shape: # <<<<<<<<<<<<<<
6674  * raise MemoryError("unable to allocate shape and strides.")
6675  *
6676  */
6677  __Pyx_TraceLine(148,0,__PYX_ERR(1, 148, __pyx_L1_error))
6678  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
6679  if (unlikely(__pyx_t_4)) {
6680 
6681  /* "View.MemoryView":149
6682  *
6683  * if not self._shape:
6684  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
6685  *
6686  *
6687  */
6688  __Pyx_TraceLine(149,0,__PYX_ERR(1, 149, __pyx_L1_error))
6689  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 149, __pyx_L1_error)
6690  __Pyx_GOTREF(__pyx_t_3);
6691  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6692  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6693  __PYX_ERR(1, 149, __pyx_L1_error)
6694 
6695  /* "View.MemoryView":148
6696  * self._strides = self._shape + self.ndim
6697  *
6698  * if not self._shape: # <<<<<<<<<<<<<<
6699  * raise MemoryError("unable to allocate shape and strides.")
6700  *
6701  */
6702  }
6703 
6704  /* "View.MemoryView":152
6705  *
6706  *
6707  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
6708  * if dim <= 0:
6709  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6710  */
6711  __Pyx_TraceLine(152,0,__PYX_ERR(1, 152, __pyx_L1_error))
6712  __pyx_t_8 = 0;
6713  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
6714  for (;;) {
6715  if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
6716  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6717  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 152, __pyx_L1_error)
6718  #else
6719  __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 152, __pyx_L1_error)
6720  __Pyx_GOTREF(__pyx_t_5);
6721  #endif
6722  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 152, __pyx_L1_error)
6723  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6724  __pyx_v_dim = __pyx_t_9;
6725  __pyx_v_idx = __pyx_t_8;
6726  __pyx_t_8 = (__pyx_t_8 + 1);
6727 
6728  /* "View.MemoryView":153
6729  *
6730  * for idx, dim in enumerate(shape):
6731  * if dim <= 0: # <<<<<<<<<<<<<<
6732  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6733  * self._shape[idx] = dim
6734  */
6735  __Pyx_TraceLine(153,0,__PYX_ERR(1, 153, __pyx_L1_error))
6736  __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
6737  if (unlikely(__pyx_t_4)) {
6738 
6739  /* "View.MemoryView":154
6740  * for idx, dim in enumerate(shape):
6741  * if dim <= 0:
6742  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<<
6743  * self._shape[idx] = dim
6744  *
6745  */
6746  __Pyx_TraceLine(154,0,__PYX_ERR(1, 154, __pyx_L1_error))
6747  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 154, __pyx_L1_error)
6748  __Pyx_GOTREF(__pyx_t_5);
6749  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
6750  __Pyx_GOTREF(__pyx_t_6);
6751  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 154, __pyx_L1_error)
6752  __Pyx_GOTREF(__pyx_t_10);
6753  __Pyx_GIVEREF(__pyx_t_5);
6754  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
6755  __Pyx_GIVEREF(__pyx_t_6);
6756  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
6757  __pyx_t_5 = 0;
6758  __pyx_t_6 = 0;
6759  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
6760  __Pyx_GOTREF(__pyx_t_6);
6761  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6762  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 154, __pyx_L1_error)
6763  __Pyx_GOTREF(__pyx_t_10);
6764  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6765  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
6766  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6767  __PYX_ERR(1, 154, __pyx_L1_error)
6768 
6769  /* "View.MemoryView":153
6770  *
6771  * for idx, dim in enumerate(shape):
6772  * if dim <= 0: # <<<<<<<<<<<<<<
6773  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6774  * self._shape[idx] = dim
6775  */
6776  }
6777 
6778  /* "View.MemoryView":155
6779  * if dim <= 0:
6780  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6781  * self._shape[idx] = dim # <<<<<<<<<<<<<<
6782  *
6783  * cdef char order
6784  */
6785  __Pyx_TraceLine(155,0,__PYX_ERR(1, 155, __pyx_L1_error))
6786  (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
6787 
6788  /* "View.MemoryView":152
6789  *
6790  *
6791  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
6792  * if dim <= 0:
6793  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6794  */
6795  __Pyx_TraceLine(152,0,__PYX_ERR(1, 152, __pyx_L1_error))
6796  }
6797  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6798 
6799  /* "View.MemoryView":158
6800  *
6801  * cdef char order
6802  * if mode == 'fortran': # <<<<<<<<<<<<<<
6803  * order = b'F'
6804  * self.mode = u'fortran'
6805  */
6806  __Pyx_TraceLine(158,0,__PYX_ERR(1, 158, __pyx_L1_error))
6807  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 158, __pyx_L1_error)
6808  if (__pyx_t_4) {
6809 
6810  /* "View.MemoryView":159
6811  * cdef char order
6812  * if mode == 'fortran':
6813  * order = b'F' # <<<<<<<<<<<<<<
6814  * self.mode = u'fortran'
6815  * elif mode == 'c':
6816  */
6817  __Pyx_TraceLine(159,0,__PYX_ERR(1, 159, __pyx_L1_error))
6818  __pyx_v_order = 'F';
6819 
6820  /* "View.MemoryView":160
6821  * if mode == 'fortran':
6822  * order = b'F'
6823  * self.mode = u'fortran' # <<<<<<<<<<<<<<
6824  * elif mode == 'c':
6825  * order = b'C'
6826  */
6827  __Pyx_TraceLine(160,0,__PYX_ERR(1, 160, __pyx_L1_error))
6828  __Pyx_INCREF(__pyx_n_u_fortran);
6829  __Pyx_GIVEREF(__pyx_n_u_fortran);
6830  __Pyx_GOTREF(__pyx_v_self->mode);
6831  __Pyx_DECREF(__pyx_v_self->mode);
6832  __pyx_v_self->mode = __pyx_n_u_fortran;
6833 
6834  /* "View.MemoryView":158
6835  *
6836  * cdef char order
6837  * if mode == 'fortran': # <<<<<<<<<<<<<<
6838  * order = b'F'
6839  * self.mode = u'fortran'
6840  */
6841  goto __pyx_L10;
6842  }
6843 
6844  /* "View.MemoryView":161
6845  * order = b'F'
6846  * self.mode = u'fortran'
6847  * elif mode == 'c': # <<<<<<<<<<<<<<
6848  * order = b'C'
6849  * self.mode = u'c'
6850  */
6851  __Pyx_TraceLine(161,0,__PYX_ERR(1, 161, __pyx_L1_error))
6852  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 161, __pyx_L1_error)
6853  if (likely(__pyx_t_4)) {
6854 
6855  /* "View.MemoryView":162
6856  * self.mode = u'fortran'
6857  * elif mode == 'c':
6858  * order = b'C' # <<<<<<<<<<<<<<
6859  * self.mode = u'c'
6860  * else:
6861  */
6862  __Pyx_TraceLine(162,0,__PYX_ERR(1, 162, __pyx_L1_error))
6863  __pyx_v_order = 'C';
6864 
6865  /* "View.MemoryView":163
6866  * elif mode == 'c':
6867  * order = b'C'
6868  * self.mode = u'c' # <<<<<<<<<<<<<<
6869  * else:
6870  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
6871  */
6872  __Pyx_TraceLine(163,0,__PYX_ERR(1, 163, __pyx_L1_error))
6873  __Pyx_INCREF(__pyx_n_u_c);
6874  __Pyx_GIVEREF(__pyx_n_u_c);
6875  __Pyx_GOTREF(__pyx_v_self->mode);
6876  __Pyx_DECREF(__pyx_v_self->mode);
6877  __pyx_v_self->mode = __pyx_n_u_c;
6878 
6879  /* "View.MemoryView":161
6880  * order = b'F'
6881  * self.mode = u'fortran'
6882  * elif mode == 'c': # <<<<<<<<<<<<<<
6883  * order = b'C'
6884  * self.mode = u'c'
6885  */
6886  goto __pyx_L10;
6887  }
6888 
6889  /* "View.MemoryView":165
6890  * self.mode = u'c'
6891  * else:
6892  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<<
6893  *
6894  * self.len = fill_contig_strides_array(self._shape, self._strides,
6895  */
6896  __Pyx_TraceLine(165,0,__PYX_ERR(1, 165, __pyx_L1_error))
6897  /*else*/ {
6898  __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 165, __pyx_L1_error)
6899  __Pyx_GOTREF(__pyx_t_3);
6900  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 165, __pyx_L1_error)
6901  __Pyx_GOTREF(__pyx_t_10);
6902  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6903  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
6904  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6905  __PYX_ERR(1, 165, __pyx_L1_error)
6906  }
6907  __pyx_L10:;
6908 
6909  /* "View.MemoryView":167
6910  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
6911  *
6912  * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<<
6913  * itemsize, self.ndim, order)
6914  *
6915  */
6916  __Pyx_TraceLine(167,0,__PYX_ERR(1, 167, __pyx_L1_error))
6917  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
6918 
6919  /* "View.MemoryView":170
6920  * itemsize, self.ndim, order)
6921  *
6922  * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
6923  * self.dtype_is_object = format == b'O'
6924  * if allocate_buffer:
6925  */
6926  __Pyx_TraceLine(170,0,__PYX_ERR(1, 170, __pyx_L1_error))
6927  __pyx_v_self->free_data = __pyx_v_allocate_buffer;
6928 
6929  /* "View.MemoryView":171
6930  *
6931  * self.free_data = allocate_buffer
6932  * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
6933  * if allocate_buffer:
6934  *
6935  */
6936  __Pyx_TraceLine(171,0,__PYX_ERR(1, 171, __pyx_L1_error))
6937  __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 171, __pyx_L1_error)
6938  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 171, __pyx_L1_error)
6939  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6940  __pyx_v_self->dtype_is_object = __pyx_t_4;
6941 
6942  /* "View.MemoryView":172
6943  * self.free_data = allocate_buffer
6944  * self.dtype_is_object = format == b'O'
6945  * if allocate_buffer: # <<<<<<<<<<<<<<
6946  *
6947  *
6948  */
6949  __Pyx_TraceLine(172,0,__PYX_ERR(1, 172, __pyx_L1_error))
6950  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
6951  if (__pyx_t_4) {
6952 
6953  /* "View.MemoryView":175
6954  *
6955  *
6956  * self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<<
6957  * if not self.data:
6958  * raise MemoryError("unable to allocate array data.")
6959  */
6960  __Pyx_TraceLine(175,0,__PYX_ERR(1, 175, __pyx_L1_error))
6961  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
6962 
6963  /* "View.MemoryView":176
6964  *
6965  * self.data = <char *>malloc(self.len)
6966  * if not self.data: # <<<<<<<<<<<<<<
6967  * raise MemoryError("unable to allocate array data.")
6968  *
6969  */
6970  __Pyx_TraceLine(176,0,__PYX_ERR(1, 176, __pyx_L1_error))
6971  __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
6972  if (unlikely(__pyx_t_4)) {
6973 
6974  /* "View.MemoryView":177
6975  * self.data = <char *>malloc(self.len)
6976  * if not self.data:
6977  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
6978  *
6979  * if self.dtype_is_object:
6980  */
6981  __Pyx_TraceLine(177,0,__PYX_ERR(1, 177, __pyx_L1_error))
6982  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 177, __pyx_L1_error)
6983  __Pyx_GOTREF(__pyx_t_10);
6984  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
6985  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6986  __PYX_ERR(1, 177, __pyx_L1_error)
6987 
6988  /* "View.MemoryView":176
6989  *
6990  * self.data = <char *>malloc(self.len)
6991  * if not self.data: # <<<<<<<<<<<<<<
6992  * raise MemoryError("unable to allocate array data.")
6993  *
6994  */
6995  }
6996 
6997  /* "View.MemoryView":179
6998  * raise MemoryError("unable to allocate array data.")
6999  *
7000  * if self.dtype_is_object: # <<<<<<<<<<<<<<
7001  * p = <PyObject **> self.data
7002  * for i in range(self.len / itemsize):
7003  */
7004  __Pyx_TraceLine(179,0,__PYX_ERR(1, 179, __pyx_L1_error))
7005  __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
7006  if (__pyx_t_4) {
7007 
7008  /* "View.MemoryView":180
7009  *
7010  * if self.dtype_is_object:
7011  * p = <PyObject **> self.data # <<<<<<<<<<<<<<
7012  * for i in range(self.len / itemsize):
7013  * p[i] = Py_None
7014  */
7015  __Pyx_TraceLine(180,0,__PYX_ERR(1, 180, __pyx_L1_error))
7016  __pyx_v_p = ((PyObject **)__pyx_v_self->data);
7017 
7018  /* "View.MemoryView":181
7019  * if self.dtype_is_object:
7020  * p = <PyObject **> self.data
7021  * for i in range(self.len / itemsize): # <<<<<<<<<<<<<<
7022  * p[i] = Py_None
7023  * Py_INCREF(Py_None)
7024  */
7025  __Pyx_TraceLine(181,0,__PYX_ERR(1, 181, __pyx_L1_error))
7026  if (unlikely(__pyx_v_itemsize == 0)) {
7027  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
7028  __PYX_ERR(1, 181, __pyx_L1_error)
7029  }
7030  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
7031  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
7032  __PYX_ERR(1, 181, __pyx_L1_error)
7033  }
7034  __pyx_t_1 = (__pyx_v_self->len / __pyx_v_itemsize);
7035  __pyx_t_9 = __pyx_t_1;
7036  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
7037  __pyx_v_i = __pyx_t_11;
7038 
7039  /* "View.MemoryView":182
7040  * p = <PyObject **> self.data
7041  * for i in range(self.len / itemsize):
7042  * p[i] = Py_None # <<<<<<<<<<<<<<
7043  * Py_INCREF(Py_None)
7044  *
7045  */
7046  __Pyx_TraceLine(182,0,__PYX_ERR(1, 182, __pyx_L1_error))
7047  (__pyx_v_p[__pyx_v_i]) = Py_None;
7048 
7049  /* "View.MemoryView":183
7050  * for i in range(self.len / itemsize):
7051  * p[i] = Py_None
7052  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
7053  *
7054  * @cname('getbuffer')
7055  */
7056  __Pyx_TraceLine(183,0,__PYX_ERR(1, 183, __pyx_L1_error))
7057  Py_INCREF(Py_None);
7058  }
7059 
7060  /* "View.MemoryView":179
7061  * raise MemoryError("unable to allocate array data.")
7062  *
7063  * if self.dtype_is_object: # <<<<<<<<<<<<<<
7064  * p = <PyObject **> self.data
7065  * for i in range(self.len / itemsize):
7066  */
7067  }
7068 
7069  /* "View.MemoryView":172
7070  * self.free_data = allocate_buffer
7071  * self.dtype_is_object = format == b'O'
7072  * if allocate_buffer: # <<<<<<<<<<<<<<
7073  *
7074  *
7075  */
7076  }
7077 
7078  /* "View.MemoryView":123
7079  * cdef bint dtype_is_object
7080  *
7081  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
7082  * mode="c", bint allocate_buffer=True):
7083  *
7084  */
7085 
7086  /* function exit code */
7087  __pyx_r = 0;
7088  goto __pyx_L0;
7089  __pyx_L1_error:;
7090  __Pyx_XDECREF(__pyx_t_3);
7091  __Pyx_XDECREF(__pyx_t_5);
7092  __Pyx_XDECREF(__pyx_t_6);
7093  __Pyx_XDECREF(__pyx_t_10);
7094  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7095  __pyx_r = -1;
7096  __pyx_L0:;
7097  __Pyx_XDECREF(__pyx_v_format);
7098  __Pyx_TraceReturn(Py_None, 0);
7099  __Pyx_RefNannyFinishContext();
7100  return __pyx_r;
7101 }
7102 
7103 /* "View.MemoryView":186
7104  *
7105  * @cname('getbuffer')
7106  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
7107  * cdef int bufmode = -1
7108  * if self.mode == u"c":
7109  */
7110 
7111 /* Python wrapper */
7112 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
7113 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
7114  int __pyx_r;
7115  __Pyx_RefNannyDeclarations
7116  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
7117  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
7118 
7119  /* function exit code */
7120  __Pyx_RefNannyFinishContext();
7121  return __pyx_r;
7122 }
7123 
7124 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
7125  int __pyx_v_bufmode;
7126  int __pyx_r;
7127  __Pyx_TraceDeclarations
7128  __Pyx_RefNannyDeclarations
7129  int __pyx_t_1;
7130  int __pyx_t_2;
7131  PyObject *__pyx_t_3 = NULL;
7132  char *__pyx_t_4;
7133  Py_ssize_t __pyx_t_5;
7134  int __pyx_t_6;
7135  Py_ssize_t *__pyx_t_7;
7136  int __pyx_lineno = 0;
7137  const char *__pyx_filename = NULL;
7138  int __pyx_clineno = 0;
7139  if (__pyx_v_info == NULL) {
7140  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
7141  return -1;
7142  }
7143  __Pyx_RefNannySetupContext("__getbuffer__", 0);
7144  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
7145  __Pyx_GIVEREF(__pyx_v_info->obj);
7146  __Pyx_TraceCall("__getbuffer__", __pyx_f[1], 186, 0, __PYX_ERR(1, 186, __pyx_L1_error));
7147 
7148  /* "View.MemoryView":187
7149  * @cname('getbuffer')
7150  * def __getbuffer__(self, Py_buffer *info, int flags):
7151  * cdef int bufmode = -1 # <<<<<<<<<<<<<<
7152  * if self.mode == u"c":
7153  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7154  */
7155  __Pyx_TraceLine(187,0,__PYX_ERR(1, 187, __pyx_L1_error))
7156  __pyx_v_bufmode = -1;
7157 
7158  /* "View.MemoryView":188
7159  * def __getbuffer__(self, Py_buffer *info, int flags):
7160  * cdef int bufmode = -1
7161  * if self.mode == u"c": # <<<<<<<<<<<<<<
7162  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7163  * elif self.mode == u"fortran":
7164  */
7165  __Pyx_TraceLine(188,0,__PYX_ERR(1, 188, __pyx_L1_error))
7166  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 188, __pyx_L1_error)
7167  __pyx_t_2 = (__pyx_t_1 != 0);
7168  if (__pyx_t_2) {
7169 
7170  /* "View.MemoryView":189
7171  * cdef int bufmode = -1
7172  * if self.mode == u"c":
7173  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
7174  * elif self.mode == u"fortran":
7175  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7176  */
7177  __Pyx_TraceLine(189,0,__PYX_ERR(1, 189, __pyx_L1_error))
7178  __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
7179 
7180  /* "View.MemoryView":188
7181  * def __getbuffer__(self, Py_buffer *info, int flags):
7182  * cdef int bufmode = -1
7183  * if self.mode == u"c": # <<<<<<<<<<<<<<
7184  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7185  * elif self.mode == u"fortran":
7186  */
7187  goto __pyx_L3;
7188  }
7189 
7190  /* "View.MemoryView":190
7191  * if self.mode == u"c":
7192  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7193  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
7194  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7195  * if not (flags & bufmode):
7196  */
7197  __Pyx_TraceLine(190,0,__PYX_ERR(1, 190, __pyx_L1_error))
7198  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 190, __pyx_L1_error)
7199  __pyx_t_1 = (__pyx_t_2 != 0);
7200  if (__pyx_t_1) {
7201 
7202  /* "View.MemoryView":191
7203  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7204  * elif self.mode == u"fortran":
7205  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
7206  * if not (flags & bufmode):
7207  * raise ValueError("Can only create a buffer that is contiguous in memory.")
7208  */
7209  __Pyx_TraceLine(191,0,__PYX_ERR(1, 191, __pyx_L1_error))
7210  __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
7211 
7212  /* "View.MemoryView":190
7213  * if self.mode == u"c":
7214  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7215  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
7216  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7217  * if not (flags & bufmode):
7218  */
7219  }
7220  __pyx_L3:;
7221 
7222  /* "View.MemoryView":192
7223  * elif self.mode == u"fortran":
7224  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7225  * if not (flags & bufmode): # <<<<<<<<<<<<<<
7226  * raise ValueError("Can only create a buffer that is contiguous in memory.")
7227  * info.buf = self.data
7228  */
7229  __Pyx_TraceLine(192,0,__PYX_ERR(1, 192, __pyx_L1_error))
7230  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
7231  if (unlikely(__pyx_t_1)) {
7232 
7233  /* "View.MemoryView":193
7234  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7235  * if not (flags & bufmode):
7236  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
7237  * info.buf = self.data
7238  * info.len = self.len
7239  */
7240  __Pyx_TraceLine(193,0,__PYX_ERR(1, 193, __pyx_L1_error))
7241  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 193, __pyx_L1_error)
7242  __Pyx_GOTREF(__pyx_t_3);
7243  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
7244  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7245  __PYX_ERR(1, 193, __pyx_L1_error)
7246 
7247  /* "View.MemoryView":192
7248  * elif self.mode == u"fortran":
7249  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7250  * if not (flags & bufmode): # <<<<<<<<<<<<<<
7251  * raise ValueError("Can only create a buffer that is contiguous in memory.")
7252  * info.buf = self.data
7253  */
7254  }
7255 
7256  /* "View.MemoryView":194
7257  * if not (flags & bufmode):
7258  * raise ValueError("Can only create a buffer that is contiguous in memory.")
7259  * info.buf = self.data # <<<<<<<<<<<<<<
7260  * info.len = self.len
7261  * info.ndim = self.ndim
7262  */
7263  __Pyx_TraceLine(194,0,__PYX_ERR(1, 194, __pyx_L1_error))
7264  __pyx_t_4 = __pyx_v_self->data;
7265  __pyx_v_info->buf = __pyx_t_4;
7266 
7267  /* "View.MemoryView":195
7268  * raise ValueError("Can only create a buffer that is contiguous in memory.")
7269  * info.buf = self.data
7270  * info.len = self.len # <<<<<<<<<<<<<<
7271  * info.ndim = self.ndim
7272  * info.shape = self._shape
7273  */
7274  __Pyx_TraceLine(195,0,__PYX_ERR(1, 195, __pyx_L1_error))
7275  __pyx_t_5 = __pyx_v_self->len;
7276  __pyx_v_info->len = __pyx_t_5;
7277 
7278  /* "View.MemoryView":196
7279  * info.buf = self.data
7280  * info.len = self.len
7281  * info.ndim = self.ndim # <<<<<<<<<<<<<<
7282  * info.shape = self._shape
7283  * info.strides = self._strides
7284  */
7285  __Pyx_TraceLine(196,0,__PYX_ERR(1, 196, __pyx_L1_error))
7286  __pyx_t_6 = __pyx_v_self->ndim;
7287  __pyx_v_info->ndim = __pyx_t_6;
7288 
7289  /* "View.MemoryView":197
7290  * info.len = self.len
7291  * info.ndim = self.ndim
7292  * info.shape = self._shape # <<<<<<<<<<<<<<
7293  * info.strides = self._strides
7294  * info.suboffsets = NULL
7295  */
7296  __Pyx_TraceLine(197,0,__PYX_ERR(1, 197, __pyx_L1_error))
7297  __pyx_t_7 = __pyx_v_self->_shape;
7298  __pyx_v_info->shape = __pyx_t_7;
7299 
7300  /* "View.MemoryView":198
7301  * info.ndim = self.ndim
7302  * info.shape = self._shape
7303  * info.strides = self._strides # <<<<<<<<<<<<<<
7304  * info.suboffsets = NULL
7305  * info.itemsize = self.itemsize
7306  */
7307  __Pyx_TraceLine(198,0,__PYX_ERR(1, 198, __pyx_L1_error))
7308  __pyx_t_7 = __pyx_v_self->_strides;
7309  __pyx_v_info->strides = __pyx_t_7;
7310 
7311  /* "View.MemoryView":199
7312  * info.shape = self._shape
7313  * info.strides = self._strides
7314  * info.suboffsets = NULL # <<<<<<<<<<<<<<
7315  * info.itemsize = self.itemsize
7316  * info.readonly = 0
7317  */
7318  __Pyx_TraceLine(199,0,__PYX_ERR(1, 199, __pyx_L1_error))
7319  __pyx_v_info->suboffsets = NULL;
7320 
7321  /* "View.MemoryView":200
7322  * info.strides = self._strides
7323  * info.suboffsets = NULL
7324  * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
7325  * info.readonly = 0
7326  *
7327  */
7328  __Pyx_TraceLine(200,0,__PYX_ERR(1, 200, __pyx_L1_error))
7329  __pyx_t_5 = __pyx_v_self->itemsize;
7330  __pyx_v_info->itemsize = __pyx_t_5;
7331 
7332  /* "View.MemoryView":201
7333  * info.suboffsets = NULL
7334  * info.itemsize = self.itemsize
7335  * info.readonly = 0 # <<<<<<<<<<<<<<
7336  *
7337  * if flags & PyBUF_FORMAT:
7338  */
7339  __Pyx_TraceLine(201,0,__PYX_ERR(1, 201, __pyx_L1_error))
7340  __pyx_v_info->readonly = 0;
7341 
7342  /* "View.MemoryView":203
7343  * info.readonly = 0
7344  *
7345  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
7346  * info.format = self.format
7347  * else:
7348  */
7349  __Pyx_TraceLine(203,0,__PYX_ERR(1, 203, __pyx_L1_error))
7350  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
7351  if (__pyx_t_1) {
7352 
7353  /* "View.MemoryView":204
7354  *
7355  * if flags & PyBUF_FORMAT:
7356  * info.format = self.format # <<<<<<<<<<<<<<
7357  * else:
7358  * info.format = NULL
7359  */
7360  __Pyx_TraceLine(204,0,__PYX_ERR(1, 204, __pyx_L1_error))
7361  __pyx_t_4 = __pyx_v_self->format;
7362  __pyx_v_info->format = __pyx_t_4;
7363 
7364  /* "View.MemoryView":203
7365  * info.readonly = 0
7366  *
7367  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
7368  * info.format = self.format
7369  * else:
7370  */
7371  goto __pyx_L5;
7372  }
7373 
7374  /* "View.MemoryView":206
7375  * info.format = self.format
7376  * else:
7377  * info.format = NULL # <<<<<<<<<<<<<<
7378  *
7379  * info.obj = self
7380  */
7381  __Pyx_TraceLine(206,0,__PYX_ERR(1, 206, __pyx_L1_error))
7382  /*else*/ {
7383  __pyx_v_info->format = NULL;
7384  }
7385  __pyx_L5:;
7386 
7387  /* "View.MemoryView":208
7388  * info.format = NULL
7389  *
7390  * info.obj = self # <<<<<<<<<<<<<<
7391  *
7392  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
7393  */
7394  __Pyx_TraceLine(208,0,__PYX_ERR(1, 208, __pyx_L1_error))
7395  __Pyx_INCREF(((PyObject *)__pyx_v_self));
7396  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7397  __Pyx_GOTREF(__pyx_v_info->obj);
7398  __Pyx_DECREF(__pyx_v_info->obj);
7399  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
7400 
7401  /* "View.MemoryView":186
7402  *
7403  * @cname('getbuffer')
7404  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
7405  * cdef int bufmode = -1
7406  * if self.mode == u"c":
7407  */
7408 
7409  /* function exit code */
7410  __pyx_r = 0;
7411  goto __pyx_L0;
7412  __pyx_L1_error:;
7413  __Pyx_XDECREF(__pyx_t_3);
7414  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7415  __pyx_r = -1;
7416  if (__pyx_v_info->obj != NULL) {
7417  __Pyx_GOTREF(__pyx_v_info->obj);
7418  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
7419  }
7420  goto __pyx_L2;
7421  __pyx_L0:;
7422  if (__pyx_v_info->obj == Py_None) {
7423  __Pyx_GOTREF(__pyx_v_info->obj);
7424  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
7425  }
7426  __pyx_L2:;
7427  __Pyx_TraceReturn(Py_None, 0);
7428  __Pyx_RefNannyFinishContext();
7429  return __pyx_r;
7430 }
7431 
7432 /* "View.MemoryView":212
7433  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
7434  *
7435  * def __dealloc__(array self): # <<<<<<<<<<<<<<
7436  * if self.callback_free_data != NULL:
7437  * self.callback_free_data(self.data)
7438  */
7439 
7440 /* Python wrapper */
7441 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
7442 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
7443  __Pyx_RefNannyDeclarations
7444  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7445  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
7446 
7447  /* function exit code */
7448  __Pyx_RefNannyFinishContext();
7449 }
7450 
7451 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
7452  __Pyx_TraceDeclarations
7453  __Pyx_RefNannyDeclarations
7454  int __pyx_t_1;
7455  int __pyx_lineno = 0;
7456  const char *__pyx_filename = NULL;
7457  int __pyx_clineno = 0;
7458  __Pyx_RefNannySetupContext("__dealloc__", 0);
7459  __Pyx_TraceCall("__dealloc__", __pyx_f[1], 212, 0, __PYX_ERR(1, 212, __pyx_L1_error));
7460 
7461  /* "View.MemoryView":213
7462  *
7463  * def __dealloc__(array self):
7464  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
7465  * self.callback_free_data(self.data)
7466  * elif self.free_data:
7467  */
7468  __Pyx_TraceLine(213,0,__PYX_ERR(1, 213, __pyx_L1_error))
7469  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
7470  if (__pyx_t_1) {
7471 
7472  /* "View.MemoryView":214
7473  * def __dealloc__(array self):
7474  * if self.callback_free_data != NULL:
7475  * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
7476  * elif self.free_data:
7477  * if self.dtype_is_object:
7478  */
7479  __Pyx_TraceLine(214,0,__PYX_ERR(1, 214, __pyx_L1_error))
7480  __pyx_v_self->callback_free_data(__pyx_v_self->data);
7481 
7482  /* "View.MemoryView":213
7483  *
7484  * def __dealloc__(array self):
7485  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
7486  * self.callback_free_data(self.data)
7487  * elif self.free_data:
7488  */
7489  goto __pyx_L3;
7490  }
7491 
7492  /* "View.MemoryView":215
7493  * if self.callback_free_data != NULL:
7494  * self.callback_free_data(self.data)
7495  * elif self.free_data: # <<<<<<<<<<<<<<
7496  * if self.dtype_is_object:
7497  * refcount_objects_in_slice(self.data, self._shape,
7498  */
7499  __Pyx_TraceLine(215,0,__PYX_ERR(1, 215, __pyx_L1_error))
7500  __pyx_t_1 = (__pyx_v_self->free_data != 0);
7501  if (__pyx_t_1) {
7502 
7503  /* "View.MemoryView":216
7504  * self.callback_free_data(self.data)
7505  * elif self.free_data:
7506  * if self.dtype_is_object: # <<<<<<<<<<<<<<
7507  * refcount_objects_in_slice(self.data, self._shape,
7508  * self._strides, self.ndim, False)
7509  */
7510  __Pyx_TraceLine(216,0,__PYX_ERR(1, 216, __pyx_L1_error))
7511  __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
7512  if (__pyx_t_1) {
7513 
7514  /* "View.MemoryView":217
7515  * elif self.free_data:
7516  * if self.dtype_is_object:
7517  * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<<
7518  * self._strides, self.ndim, False)
7519  * free(self.data)
7520  */
7521  __Pyx_TraceLine(217,0,__PYX_ERR(1, 217, __pyx_L1_error))
7522  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
7523 
7524  /* "View.MemoryView":216
7525  * self.callback_free_data(self.data)
7526  * elif self.free_data:
7527  * if self.dtype_is_object: # <<<<<<<<<<<<<<
7528  * refcount_objects_in_slice(self.data, self._shape,
7529  * self._strides, self.ndim, False)
7530  */
7531  }
7532 
7533  /* "View.MemoryView":219
7534  * refcount_objects_in_slice(self.data, self._shape,
7535  * self._strides, self.ndim, False)
7536  * free(self.data) # <<<<<<<<<<<<<<
7537  * PyObject_Free(self._shape)
7538  *
7539  */
7540  __Pyx_TraceLine(219,0,__PYX_ERR(1, 219, __pyx_L1_error))
7541  free(__pyx_v_self->data);
7542 
7543  /* "View.MemoryView":215
7544  * if self.callback_free_data != NULL:
7545  * self.callback_free_data(self.data)
7546  * elif self.free_data: # <<<<<<<<<<<<<<
7547  * if self.dtype_is_object:
7548  * refcount_objects_in_slice(self.data, self._shape,
7549  */
7550  }
7551  __pyx_L3:;
7552 
7553  /* "View.MemoryView":220
7554  * self._strides, self.ndim, False)
7555  * free(self.data)
7556  * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
7557  *
7558  * @property
7559  */
7560  __Pyx_TraceLine(220,0,__PYX_ERR(1, 220, __pyx_L1_error))
7561  PyObject_Free(__pyx_v_self->_shape);
7562 
7563  /* "View.MemoryView":212
7564  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
7565  *
7566  * def __dealloc__(array self): # <<<<<<<<<<<<<<
7567  * if self.callback_free_data != NULL:
7568  * self.callback_free_data(self.data)
7569  */
7570 
7571  /* function exit code */
7572  goto __pyx_L0;
7573  __pyx_L1_error:;
7574  __Pyx_WriteUnraisable("View.MemoryView.array.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
7575  __pyx_L0:;
7576  __Pyx_TraceReturn(Py_None, 0);
7577  __Pyx_RefNannyFinishContext();
7578 }
7579 
7580 /* "View.MemoryView":223
7581  *
7582  * @property
7583  * def memview(self): # <<<<<<<<<<<<<<
7584  * return self.get_memview()
7585  *
7586  */
7587 
7588 /* Python wrapper */
7589 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
7590 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
7591  PyObject *__pyx_r = 0;
7592  __Pyx_RefNannyDeclarations
7593  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7594  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
7595 
7596  /* function exit code */
7597  __Pyx_RefNannyFinishContext();
7598  return __pyx_r;
7599 }
7600 
7601 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
7602  PyObject *__pyx_r = NULL;
7603  __Pyx_TraceDeclarations
7604  __Pyx_RefNannyDeclarations
7605  PyObject *__pyx_t_1 = NULL;
7606  int __pyx_lineno = 0;
7607  const char *__pyx_filename = NULL;
7608  int __pyx_clineno = 0;
7609  __Pyx_RefNannySetupContext("__get__", 0);
7610  __Pyx_TraceCall("__get__", __pyx_f[1], 223, 0, __PYX_ERR(1, 223, __pyx_L1_error));
7611 
7612  /* "View.MemoryView":224
7613  * @property
7614  * def memview(self):
7615  * return self.get_memview() # <<<<<<<<<<<<<<
7616  *
7617  * @cname('get_memview')
7618  */
7619  __Pyx_TraceLine(224,0,__PYX_ERR(1, 224, __pyx_L1_error))
7620  __Pyx_XDECREF(__pyx_r);
7621  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error)
7622  __Pyx_GOTREF(__pyx_t_1);
7623  __pyx_r = __pyx_t_1;
7624  __pyx_t_1 = 0;
7625  goto __pyx_L0;
7626 
7627  /* "View.MemoryView":223
7628  *
7629  * @property
7630  * def memview(self): # <<<<<<<<<<<<<<
7631  * return self.get_memview()
7632  *
7633  */
7634 
7635  /* function exit code */
7636  __pyx_L1_error:;
7637  __Pyx_XDECREF(__pyx_t_1);
7638  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7639  __pyx_r = NULL;
7640  __pyx_L0:;
7641  __Pyx_XGIVEREF(__pyx_r);
7642  __Pyx_TraceReturn(__pyx_r, 0);
7643  __Pyx_RefNannyFinishContext();
7644  return __pyx_r;
7645 }
7646 
7647 /* "View.MemoryView":227
7648  *
7649  * @cname('get_memview')
7650  * cdef get_memview(self): # <<<<<<<<<<<<<<
7651  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
7652  * return memoryview(self, flags, self.dtype_is_object)
7653  */
7654 
7655 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
7656  int __pyx_v_flags;
7657  PyObject *__pyx_r = NULL;
7658  __Pyx_TraceDeclarations
7659  __Pyx_RefNannyDeclarations
7660  PyObject *__pyx_t_1 = NULL;
7661  PyObject *__pyx_t_2 = NULL;
7662  PyObject *__pyx_t_3 = NULL;
7663  int __pyx_lineno = 0;
7664  const char *__pyx_filename = NULL;
7665  int __pyx_clineno = 0;
7666  __Pyx_RefNannySetupContext("get_memview", 0);
7667  __Pyx_TraceCall("get_memview", __pyx_f[1], 227, 0, __PYX_ERR(1, 227, __pyx_L1_error));
7668 
7669  /* "View.MemoryView":228
7670  * @cname('get_memview')
7671  * cdef get_memview(self):
7672  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
7673  * return memoryview(self, flags, self.dtype_is_object)
7674  *
7675  */
7676  __Pyx_TraceLine(228,0,__PYX_ERR(1, 228, __pyx_L1_error))
7677  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
7678 
7679  /* "View.MemoryView":229
7680  * cdef get_memview(self):
7681  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
7682  * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
7683  *
7684  * def __len__(self):
7685  */
7686  __Pyx_TraceLine(229,0,__PYX_ERR(1, 229, __pyx_L1_error))
7687  __Pyx_XDECREF(__pyx_r);
7688  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
7689  __Pyx_GOTREF(__pyx_t_1);
7690  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
7691  __Pyx_GOTREF(__pyx_t_2);
7692  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 229, __pyx_L1_error)
7693  __Pyx_GOTREF(__pyx_t_3);
7694  __Pyx_INCREF(((PyObject *)__pyx_v_self));
7695  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7696  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
7697  __Pyx_GIVEREF(__pyx_t_1);
7698  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
7699  __Pyx_GIVEREF(__pyx_t_2);
7700  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
7701  __pyx_t_1 = 0;
7702  __pyx_t_2 = 0;
7703  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
7704  __Pyx_GOTREF(__pyx_t_2);
7705  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7706  __pyx_r = __pyx_t_2;
7707  __pyx_t_2 = 0;
7708  goto __pyx_L0;
7709 
7710  /* "View.MemoryView":227
7711  *
7712  * @cname('get_memview')
7713  * cdef get_memview(self): # <<<<<<<<<<<<<<
7714  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
7715  * return memoryview(self, flags, self.dtype_is_object)
7716  */
7717 
7718  /* function exit code */
7719  __pyx_L1_error:;
7720  __Pyx_XDECREF(__pyx_t_1);
7721  __Pyx_XDECREF(__pyx_t_2);
7722  __Pyx_XDECREF(__pyx_t_3);
7723  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
7724  __pyx_r = 0;
7725  __pyx_L0:;
7726  __Pyx_XGIVEREF(__pyx_r);
7727  __Pyx_TraceReturn(__pyx_r, 0);
7728  __Pyx_RefNannyFinishContext();
7729  return __pyx_r;
7730 }
7731 
7732 /* "View.MemoryView":231
7733  * return memoryview(self, flags, self.dtype_is_object)
7734  *
7735  * def __len__(self): # <<<<<<<<<<<<<<
7736  * return self._shape[0]
7737  *
7738  */
7739 
7740 /* Python wrapper */
7741 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
7742 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
7743  Py_ssize_t __pyx_r;
7744  __Pyx_RefNannyDeclarations
7745  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
7746  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
7747 
7748  /* function exit code */
7749  __Pyx_RefNannyFinishContext();
7750  return __pyx_r;
7751 }
7752 
7753 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
7754  Py_ssize_t __pyx_r;
7755  __Pyx_TraceDeclarations
7756  __Pyx_RefNannyDeclarations
7757  int __pyx_lineno = 0;
7758  const char *__pyx_filename = NULL;
7759  int __pyx_clineno = 0;
7760  __Pyx_RefNannySetupContext("__len__", 0);
7761  __Pyx_TraceCall("__len__", __pyx_f[1], 231, 0, __PYX_ERR(1, 231, __pyx_L1_error));
7762 
7763  /* "View.MemoryView":232
7764  *
7765  * def __len__(self):
7766  * return self._shape[0] # <<<<<<<<<<<<<<
7767  *
7768  * def __getattr__(self, attr):
7769  */
7770  __Pyx_TraceLine(232,0,__PYX_ERR(1, 232, __pyx_L1_error))
7771  __pyx_r = (__pyx_v_self->_shape[0]);
7772  goto __pyx_L0;
7773 
7774  /* "View.MemoryView":231
7775  * return memoryview(self, flags, self.dtype_is_object)
7776  *
7777  * def __len__(self): # <<<<<<<<<<<<<<
7778  * return self._shape[0]
7779  *
7780  */
7781 
7782  /* function exit code */
7783  __pyx_L1_error:;
7784  __Pyx_AddTraceback("View.MemoryView.array.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7785  __pyx_r = -1;
7786  __pyx_L0:;
7787  __Pyx_TraceReturn(Py_None, 0);
7788  __Pyx_RefNannyFinishContext();
7789  return __pyx_r;
7790 }
7791 
7792 /* "View.MemoryView":234
7793  * return self._shape[0]
7794  *
7795  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
7796  * return getattr(self.memview, attr)
7797  *
7798  */
7799 
7800 /* Python wrapper */
7801 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
7802 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
7803  PyObject *__pyx_r = 0;
7804  __Pyx_RefNannyDeclarations
7805  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
7806  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
7807 
7808  /* function exit code */
7809  __Pyx_RefNannyFinishContext();
7810  return __pyx_r;
7811 }
7812 
7813 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
7814  PyObject *__pyx_r = NULL;
7815  __Pyx_TraceDeclarations
7816  __Pyx_RefNannyDeclarations
7817  PyObject *__pyx_t_1 = NULL;
7818  PyObject *__pyx_t_2 = NULL;
7819  int __pyx_lineno = 0;
7820  const char *__pyx_filename = NULL;
7821  int __pyx_clineno = 0;
7822  __Pyx_RefNannySetupContext("__getattr__", 0);
7823  __Pyx_TraceCall("__getattr__", __pyx_f[1], 234, 0, __PYX_ERR(1, 234, __pyx_L1_error));
7824 
7825  /* "View.MemoryView":235
7826  *
7827  * def __getattr__(self, attr):
7828  * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
7829  *
7830  * def __getitem__(self, item):
7831  */
7832  __Pyx_TraceLine(235,0,__PYX_ERR(1, 235, __pyx_L1_error))
7833  __Pyx_XDECREF(__pyx_r);
7834  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
7835  __Pyx_GOTREF(__pyx_t_1);
7836  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error)
7837  __Pyx_GOTREF(__pyx_t_2);
7838  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7839  __pyx_r = __pyx_t_2;
7840  __pyx_t_2 = 0;
7841  goto __pyx_L0;
7842 
7843  /* "View.MemoryView":234
7844  * return self._shape[0]
7845  *
7846  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
7847  * return getattr(self.memview, attr)
7848  *
7849  */
7850 
7851  /* function exit code */
7852  __pyx_L1_error:;
7853  __Pyx_XDECREF(__pyx_t_1);
7854  __Pyx_XDECREF(__pyx_t_2);
7855  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7856  __pyx_r = NULL;
7857  __pyx_L0:;
7858  __Pyx_XGIVEREF(__pyx_r);
7859  __Pyx_TraceReturn(__pyx_r, 0);
7860  __Pyx_RefNannyFinishContext();
7861  return __pyx_r;
7862 }
7863 
7864 /* "View.MemoryView":237
7865  * return getattr(self.memview, attr)
7866  *
7867  * def __getitem__(self, item): # <<<<<<<<<<<<<<
7868  * return self.memview[item]
7869  *
7870  */
7871 
7872 /* Python wrapper */
7873 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
7874 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
7875  PyObject *__pyx_r = 0;
7876  __Pyx_RefNannyDeclarations
7877  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7878  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
7879 
7880  /* function exit code */
7881  __Pyx_RefNannyFinishContext();
7882  return __pyx_r;
7883 }
7884 
7885 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
7886  PyObject *__pyx_r = NULL;
7887  __Pyx_TraceDeclarations
7888  __Pyx_RefNannyDeclarations
7889  PyObject *__pyx_t_1 = NULL;
7890  PyObject *__pyx_t_2 = NULL;
7891  int __pyx_lineno = 0;
7892  const char *__pyx_filename = NULL;
7893  int __pyx_clineno = 0;
7894  __Pyx_RefNannySetupContext("__getitem__", 0);
7895  __Pyx_TraceCall("__getitem__", __pyx_f[1], 237, 0, __PYX_ERR(1, 237, __pyx_L1_error));
7896 
7897  /* "View.MemoryView":238
7898  *
7899  * def __getitem__(self, item):
7900  * return self.memview[item] # <<<<<<<<<<<<<<
7901  *
7902  * def __setitem__(self, item, value):
7903  */
7904  __Pyx_TraceLine(238,0,__PYX_ERR(1, 238, __pyx_L1_error))
7905  __Pyx_XDECREF(__pyx_r);
7906  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
7907  __Pyx_GOTREF(__pyx_t_1);
7908  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 238, __pyx_L1_error)
7909  __Pyx_GOTREF(__pyx_t_2);
7910  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7911  __pyx_r = __pyx_t_2;
7912  __pyx_t_2 = 0;
7913  goto __pyx_L0;
7914 
7915  /* "View.MemoryView":237
7916  * return getattr(self.memview, attr)
7917  *
7918  * def __getitem__(self, item): # <<<<<<<<<<<<<<
7919  * return self.memview[item]
7920  *
7921  */
7922 
7923  /* function exit code */
7924  __pyx_L1_error:;
7925  __Pyx_XDECREF(__pyx_t_1);
7926  __Pyx_XDECREF(__pyx_t_2);
7927  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7928  __pyx_r = NULL;
7929  __pyx_L0:;
7930  __Pyx_XGIVEREF(__pyx_r);
7931  __Pyx_TraceReturn(__pyx_r, 0);
7932  __Pyx_RefNannyFinishContext();
7933  return __pyx_r;
7934 }
7935 
7936 /* "View.MemoryView":240
7937  * return self.memview[item]
7938  *
7939  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
7940  * self.memview[item] = value
7941  *
7942  */
7943 
7944 /* Python wrapper */
7945 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
7946 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
7947  int __pyx_r;
7948  __Pyx_RefNannyDeclarations
7949  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
7950  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
7951 
7952  /* function exit code */
7953  __Pyx_RefNannyFinishContext();
7954  return __pyx_r;
7955 }
7956 
7957 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
7958  int __pyx_r;
7959  __Pyx_TraceDeclarations
7960  __Pyx_RefNannyDeclarations
7961  PyObject *__pyx_t_1 = NULL;
7962  int __pyx_lineno = 0;
7963  const char *__pyx_filename = NULL;
7964  int __pyx_clineno = 0;
7965  __Pyx_RefNannySetupContext("__setitem__", 0);
7966  __Pyx_TraceCall("__setitem__", __pyx_f[1], 240, 0, __PYX_ERR(1, 240, __pyx_L1_error));
7967 
7968  /* "View.MemoryView":241
7969  *
7970  * def __setitem__(self, item, value):
7971  * self.memview[item] = value # <<<<<<<<<<<<<<
7972  *
7973  *
7974  */
7975  __Pyx_TraceLine(241,0,__PYX_ERR(1, 241, __pyx_L1_error))
7976  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 241, __pyx_L1_error)
7977  __Pyx_GOTREF(__pyx_t_1);
7978  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(1, 241, __pyx_L1_error)
7979  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7980 
7981  /* "View.MemoryView":240
7982  * return self.memview[item]
7983  *
7984  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
7985  * self.memview[item] = value
7986  *
7987  */
7988 
7989  /* function exit code */
7990  __pyx_r = 0;
7991  goto __pyx_L0;
7992  __pyx_L1_error:;
7993  __Pyx_XDECREF(__pyx_t_1);
7994  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7995  __pyx_r = -1;
7996  __pyx_L0:;
7997  __Pyx_TraceReturn(Py_None, 0);
7998  __Pyx_RefNannyFinishContext();
7999  return __pyx_r;
8000 }
8001 
8002 /* "(tree fragment)":1
8003  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8004  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8005  * def __setstate_cython__(self, __pyx_state):
8006  */
8007 
8008 /* Python wrapper */
8009 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8010 static PyMethodDef __pyx_mdef___pyx_array_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0};
8011 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8012  PyObject *__pyx_r = 0;
8013  __Pyx_RefNannyDeclarations
8014  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
8015  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
8016 
8017  /* function exit code */
8018  __Pyx_RefNannyFinishContext();
8019  return __pyx_r;
8020 }
8021 
8022 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
8023  PyObject *__pyx_r = NULL;
8024  __Pyx_TraceDeclarations
8025  __Pyx_RefNannyDeclarations
8026  PyObject *__pyx_t_1 = NULL;
8027  int __pyx_lineno = 0;
8028  const char *__pyx_filename = NULL;
8029  int __pyx_clineno = 0;
8030  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
8031  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
8032 
8033  /* "(tree fragment)":2
8034  * def __reduce_cython__(self):
8035  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
8036  * def __setstate_cython__(self, __pyx_state):
8037  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8038  */
8039  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
8040  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
8041  __Pyx_GOTREF(__pyx_t_1);
8042  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8043  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8044  __PYX_ERR(1, 2, __pyx_L1_error)
8045 
8046  /* "(tree fragment)":1
8047  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8048  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8049  * def __setstate_cython__(self, __pyx_state):
8050  */
8051 
8052  /* function exit code */
8053  __pyx_L1_error:;
8054  __Pyx_XDECREF(__pyx_t_1);
8055  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8056  __pyx_r = NULL;
8057  __Pyx_XGIVEREF(__pyx_r);
8058  __Pyx_TraceReturn(__pyx_r, 0);
8059  __Pyx_RefNannyFinishContext();
8060  return __pyx_r;
8061 }
8062 
8063 /* "(tree fragment)":3
8064  * def __reduce_cython__(self):
8065  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8066  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8067  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8068  */
8069 
8070 /* Python wrapper */
8071 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
8072 static PyMethodDef __pyx_mdef___pyx_array_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0};
8073 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
8074  PyObject *__pyx_r = 0;
8075  __Pyx_RefNannyDeclarations
8076  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
8077  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
8078 
8079  /* function exit code */
8080  __Pyx_RefNannyFinishContext();
8081  return __pyx_r;
8082 }
8083 
8084 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
8085  PyObject *__pyx_r = NULL;
8086  __Pyx_TraceDeclarations
8087  __Pyx_RefNannyDeclarations
8088  PyObject *__pyx_t_1 = NULL;
8089  int __pyx_lineno = 0;
8090  const char *__pyx_filename = NULL;
8091  int __pyx_clineno = 0;
8092  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
8093  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
8094 
8095  /* "(tree fragment)":4
8096  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8097  * def __setstate_cython__(self, __pyx_state):
8098  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
8099  */
8100  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
8101  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
8102  __Pyx_GOTREF(__pyx_t_1);
8103  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8104  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8105  __PYX_ERR(1, 4, __pyx_L1_error)
8106 
8107  /* "(tree fragment)":3
8108  * def __reduce_cython__(self):
8109  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8110  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8111  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8112  */
8113 
8114  /* function exit code */
8115  __pyx_L1_error:;
8116  __Pyx_XDECREF(__pyx_t_1);
8117  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8118  __pyx_r = NULL;
8119  __Pyx_XGIVEREF(__pyx_r);
8120  __Pyx_TraceReturn(__pyx_r, 0);
8121  __Pyx_RefNannyFinishContext();
8122  return __pyx_r;
8123 }
8124 
8125 /* "View.MemoryView":245
8126  *
8127  * @cname("__pyx_array_new")
8128  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
8129  * char *mode, char *buf):
8130  * cdef array result
8131  */
8132 
8133 static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
8134  struct __pyx_array_obj *__pyx_v_result = 0;
8135  struct __pyx_array_obj *__pyx_r = NULL;
8136  __Pyx_TraceDeclarations
8137  __Pyx_RefNannyDeclarations
8138  int __pyx_t_1;
8139  PyObject *__pyx_t_2 = NULL;
8140  PyObject *__pyx_t_3 = NULL;
8141  PyObject *__pyx_t_4 = NULL;
8142  PyObject *__pyx_t_5 = NULL;
8143  int __pyx_lineno = 0;
8144  const char *__pyx_filename = NULL;
8145  int __pyx_clineno = 0;
8146  __Pyx_RefNannySetupContext("array_cwrapper", 0);
8147  __Pyx_TraceCall("array_cwrapper", __pyx_f[1], 245, 0, __PYX_ERR(1, 245, __pyx_L1_error));
8148 
8149  /* "View.MemoryView":249
8150  * cdef array result
8151  *
8152  * if buf == NULL: # <<<<<<<<<<<<<<
8153  * result = array(shape, itemsize, format, mode.decode('ASCII'))
8154  * else:
8155  */
8156  __Pyx_TraceLine(249,0,__PYX_ERR(1, 249, __pyx_L1_error))
8157  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
8158  if (__pyx_t_1) {
8159 
8160  /* "View.MemoryView":250
8161  *
8162  * if buf == NULL:
8163  * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<<
8164  * else:
8165  * result = array(shape, itemsize, format, mode.decode('ASCII'),
8166  */
8167  __Pyx_TraceLine(250,0,__PYX_ERR(1, 250, __pyx_L1_error))
8168  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 250, __pyx_L1_error)
8169  __Pyx_GOTREF(__pyx_t_2);
8170  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 250, __pyx_L1_error)
8171  __Pyx_GOTREF(__pyx_t_3);
8172  __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 250, __pyx_L1_error)
8173  __Pyx_GOTREF(__pyx_t_4);
8174  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 250, __pyx_L1_error)
8175  __Pyx_GOTREF(__pyx_t_5);
8176  __Pyx_INCREF(__pyx_v_shape);
8177  __Pyx_GIVEREF(__pyx_v_shape);
8178  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
8179  __Pyx_GIVEREF(__pyx_t_2);
8180  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
8181  __Pyx_GIVEREF(__pyx_t_3);
8182  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
8183  __Pyx_GIVEREF(__pyx_t_4);
8184  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
8185  __pyx_t_2 = 0;
8186  __pyx_t_3 = 0;
8187  __pyx_t_4 = 0;
8188  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 250, __pyx_L1_error)
8189  __Pyx_GOTREF(__pyx_t_4);
8190  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8191  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
8192  __pyx_t_4 = 0;
8193 
8194  /* "View.MemoryView":249
8195  * cdef array result
8196  *
8197  * if buf == NULL: # <<<<<<<<<<<<<<
8198  * result = array(shape, itemsize, format, mode.decode('ASCII'))
8199  * else:
8200  */
8201  goto __pyx_L3;
8202  }
8203 
8204  /* "View.MemoryView":252
8205  * result = array(shape, itemsize, format, mode.decode('ASCII'))
8206  * else:
8207  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
8208  * allocate_buffer=False)
8209  * result.data = buf
8210  */
8211  __Pyx_TraceLine(252,0,__PYX_ERR(1, 252, __pyx_L1_error))
8212  /*else*/ {
8213  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 252, __pyx_L1_error)
8214  __Pyx_GOTREF(__pyx_t_4);
8215  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error)
8216  __Pyx_GOTREF(__pyx_t_5);
8217  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error)
8218  __Pyx_GOTREF(__pyx_t_3);
8219  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 252, __pyx_L1_error)
8220  __Pyx_GOTREF(__pyx_t_2);
8221  __Pyx_INCREF(__pyx_v_shape);
8222  __Pyx_GIVEREF(__pyx_v_shape);
8223  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
8224  __Pyx_GIVEREF(__pyx_t_4);
8225  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
8226  __Pyx_GIVEREF(__pyx_t_5);
8227  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
8228  __Pyx_GIVEREF(__pyx_t_3);
8229  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
8230  __pyx_t_4 = 0;
8231  __pyx_t_5 = 0;
8232  __pyx_t_3 = 0;
8233 
8234  /* "View.MemoryView":253
8235  * else:
8236  * result = array(shape, itemsize, format, mode.decode('ASCII'),
8237  * allocate_buffer=False) # <<<<<<<<<<<<<<
8238  * result.data = buf
8239  *
8240  */
8241  __Pyx_TraceLine(253,0,__PYX_ERR(1, 253, __pyx_L1_error))
8242  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 253, __pyx_L1_error)
8243  __Pyx_GOTREF(__pyx_t_3);
8244  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 253, __pyx_L1_error)
8245 
8246  /* "View.MemoryView":252
8247  * result = array(shape, itemsize, format, mode.decode('ASCII'))
8248  * else:
8249  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
8250  * allocate_buffer=False)
8251  * result.data = buf
8252  */
8253  __Pyx_TraceLine(252,0,__PYX_ERR(1, 252, __pyx_L1_error))
8254  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error)
8255  __Pyx_GOTREF(__pyx_t_5);
8256  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8257  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8258  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
8259  __pyx_t_5 = 0;
8260 
8261  /* "View.MemoryView":254
8262  * result = array(shape, itemsize, format, mode.decode('ASCII'),
8263  * allocate_buffer=False)
8264  * result.data = buf # <<<<<<<<<<<<<<
8265  *
8266  * return result
8267  */
8268  __Pyx_TraceLine(254,0,__PYX_ERR(1, 254, __pyx_L1_error))
8269  __pyx_v_result->data = __pyx_v_buf;
8270  }
8271  __pyx_L3:;
8272 
8273  /* "View.MemoryView":256
8274  * result.data = buf
8275  *
8276  * return result # <<<<<<<<<<<<<<
8277  *
8278  *
8279  */
8280  __Pyx_TraceLine(256,0,__PYX_ERR(1, 256, __pyx_L1_error))
8281  __Pyx_XDECREF(((PyObject *)__pyx_r));
8282  __Pyx_INCREF(((PyObject *)__pyx_v_result));
8283  __pyx_r = __pyx_v_result;
8284  goto __pyx_L0;
8285 
8286  /* "View.MemoryView":245
8287  *
8288  * @cname("__pyx_array_new")
8289  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
8290  * char *mode, char *buf):
8291  * cdef array result
8292  */
8293 
8294  /* function exit code */
8295  __pyx_L1_error:;
8296  __Pyx_XDECREF(__pyx_t_2);
8297  __Pyx_XDECREF(__pyx_t_3);
8298  __Pyx_XDECREF(__pyx_t_4);
8299  __Pyx_XDECREF(__pyx_t_5);
8300  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
8301  __pyx_r = 0;
8302  __pyx_L0:;
8303  __Pyx_XDECREF((PyObject *)__pyx_v_result);
8304  __Pyx_XGIVEREF((PyObject *)__pyx_r);
8305  __Pyx_TraceReturn(__pyx_r, 0);
8306  __Pyx_RefNannyFinishContext();
8307  return __pyx_r;
8308 }
8309 
8310 /* "View.MemoryView":282
8311  * cdef class Enum(object):
8312  * cdef object name
8313  * def __init__(self, name): # <<<<<<<<<<<<<<
8314  * self.name = name
8315  * def __repr__(self):
8316  */
8317 
8318 /* Python wrapper */
8319 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8320 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8321  PyObject *__pyx_v_name = 0;
8322  int __pyx_lineno = 0;
8323  const char *__pyx_filename = NULL;
8324  int __pyx_clineno = 0;
8325  int __pyx_r;
8326  __Pyx_RefNannyDeclarations
8327  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
8328  {
8329  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
8330  PyObject* values[1] = {0};
8331  if (unlikely(__pyx_kwds)) {
8332  Py_ssize_t kw_args;
8333  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8334  switch (pos_args) {
8335  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8336  CYTHON_FALLTHROUGH;
8337  case 0: break;
8338  default: goto __pyx_L5_argtuple_error;
8339  }
8340  kw_args = PyDict_Size(__pyx_kwds);
8341  switch (pos_args) {
8342  case 0:
8343  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
8344  else goto __pyx_L5_argtuple_error;
8345  }
8346  if (unlikely(kw_args > 0)) {
8347  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 282, __pyx_L3_error)
8348  }
8349  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
8350  goto __pyx_L5_argtuple_error;
8351  } else {
8352  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8353  }
8354  __pyx_v_name = values[0];
8355  }
8356  goto __pyx_L4_argument_unpacking_done;
8357  __pyx_L5_argtuple_error:;
8358  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 282, __pyx_L3_error)
8359  __pyx_L3_error:;
8360  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8361  __Pyx_RefNannyFinishContext();
8362  return -1;
8363  __pyx_L4_argument_unpacking_done:;
8364  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
8365 
8366  /* function exit code */
8367  __Pyx_RefNannyFinishContext();
8368  return __pyx_r;
8369 }
8370 
8371 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
8372  int __pyx_r;
8373  __Pyx_TraceDeclarations
8374  __Pyx_RefNannyDeclarations
8375  int __pyx_lineno = 0;
8376  const char *__pyx_filename = NULL;
8377  int __pyx_clineno = 0;
8378  __Pyx_RefNannySetupContext("__init__", 0);
8379  __Pyx_TraceCall("__init__", __pyx_f[1], 282, 0, __PYX_ERR(1, 282, __pyx_L1_error));
8380 
8381  /* "View.MemoryView":283
8382  * cdef object name
8383  * def __init__(self, name):
8384  * self.name = name # <<<<<<<<<<<<<<
8385  * def __repr__(self):
8386  * return self.name
8387  */
8388  __Pyx_TraceLine(283,0,__PYX_ERR(1, 283, __pyx_L1_error))
8389  __Pyx_INCREF(__pyx_v_name);
8390  __Pyx_GIVEREF(__pyx_v_name);
8391  __Pyx_GOTREF(__pyx_v_self->name);
8392  __Pyx_DECREF(__pyx_v_self->name);
8393  __pyx_v_self->name = __pyx_v_name;
8394 
8395  /* "View.MemoryView":282
8396  * cdef class Enum(object):
8397  * cdef object name
8398  * def __init__(self, name): # <<<<<<<<<<<<<<
8399  * self.name = name
8400  * def __repr__(self):
8401  */
8402 
8403  /* function exit code */
8404  __pyx_r = 0;
8405  goto __pyx_L0;
8406  __pyx_L1_error:;
8407  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8408  __pyx_r = -1;
8409  __pyx_L0:;
8410  __Pyx_TraceReturn(Py_None, 0);
8411  __Pyx_RefNannyFinishContext();
8412  return __pyx_r;
8413 }
8414 
8415 /* "View.MemoryView":284
8416  * def __init__(self, name):
8417  * self.name = name
8418  * def __repr__(self): # <<<<<<<<<<<<<<
8419  * return self.name
8420  *
8421  */
8422 
8423 /* Python wrapper */
8424 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
8425 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
8426  PyObject *__pyx_r = 0;
8427  __Pyx_RefNannyDeclarations
8428  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
8429  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
8430 
8431  /* function exit code */
8432  __Pyx_RefNannyFinishContext();
8433  return __pyx_r;
8434 }
8435 
8436 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
8437  PyObject *__pyx_r = NULL;
8438  __Pyx_TraceDeclarations
8439  __Pyx_RefNannyDeclarations
8440  int __pyx_lineno = 0;
8441  const char *__pyx_filename = NULL;
8442  int __pyx_clineno = 0;
8443  __Pyx_RefNannySetupContext("__repr__", 0);
8444  __Pyx_TraceCall("__repr__", __pyx_f[1], 284, 0, __PYX_ERR(1, 284, __pyx_L1_error));
8445 
8446  /* "View.MemoryView":285
8447  * self.name = name
8448  * def __repr__(self):
8449  * return self.name # <<<<<<<<<<<<<<
8450  *
8451  * cdef generic = Enum("<strided and direct or indirect>")
8452  */
8453  __Pyx_TraceLine(285,0,__PYX_ERR(1, 285, __pyx_L1_error))
8454  __Pyx_XDECREF(__pyx_r);
8455  __Pyx_INCREF(__pyx_v_self->name);
8456  __pyx_r = __pyx_v_self->name;
8457  goto __pyx_L0;
8458 
8459  /* "View.MemoryView":284
8460  * def __init__(self, name):
8461  * self.name = name
8462  * def __repr__(self): # <<<<<<<<<<<<<<
8463  * return self.name
8464  *
8465  */
8466 
8467  /* function exit code */
8468  __pyx_L1_error:;
8469  __Pyx_AddTraceback("View.MemoryView.Enum.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8470  __pyx_r = NULL;
8471  __pyx_L0:;
8472  __Pyx_XGIVEREF(__pyx_r);
8473  __Pyx_TraceReturn(__pyx_r, 0);
8474  __Pyx_RefNannyFinishContext();
8475  return __pyx_r;
8476 }
8477 
8478 /* "(tree fragment)":1
8479  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8480  * cdef tuple state
8481  * cdef object _dict
8482  */
8483 
8484 /* Python wrapper */
8485 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8486 static PyMethodDef __pyx_mdef___pyx_MemviewEnum_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0};
8487 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8488  PyObject *__pyx_r = 0;
8489  __Pyx_RefNannyDeclarations
8490  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
8491  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
8492 
8493  /* function exit code */
8494  __Pyx_RefNannyFinishContext();
8495  return __pyx_r;
8496 }
8497 
8498 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
8499  PyObject *__pyx_v_state = 0;
8500  PyObject *__pyx_v__dict = 0;
8501  int __pyx_v_use_setstate;
8502  PyObject *__pyx_r = NULL;
8503  __Pyx_TraceDeclarations
8504  __Pyx_RefNannyDeclarations
8505  PyObject *__pyx_t_1 = NULL;
8506  int __pyx_t_2;
8507  int __pyx_t_3;
8508  PyObject *__pyx_t_4 = NULL;
8509  PyObject *__pyx_t_5 = NULL;
8510  int __pyx_lineno = 0;
8511  const char *__pyx_filename = NULL;
8512  int __pyx_clineno = 0;
8513  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
8514  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
8515 
8516  /* "(tree fragment)":5
8517  * cdef object _dict
8518  * cdef bint use_setstate
8519  * state = (self.name,) # <<<<<<<<<<<<<<
8520  * _dict = getattr(self, '__dict__', None)
8521  * if _dict is not None:
8522  */
8523  __Pyx_TraceLine(5,0,__PYX_ERR(1, 5, __pyx_L1_error))
8524  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
8525  __Pyx_GOTREF(__pyx_t_1);
8526  __Pyx_INCREF(__pyx_v_self->name);
8527  __Pyx_GIVEREF(__pyx_v_self->name);
8528  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
8529  __pyx_v_state = ((PyObject*)__pyx_t_1);
8530  __pyx_t_1 = 0;
8531 
8532  /* "(tree fragment)":6
8533  * cdef bint use_setstate
8534  * state = (self.name,)
8535  * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
8536  * if _dict is not None:
8537  * state += (_dict,)
8538  */
8539  __Pyx_TraceLine(6,0,__PYX_ERR(1, 6, __pyx_L1_error))
8540  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
8541  __Pyx_GOTREF(__pyx_t_1);
8542  __pyx_v__dict = __pyx_t_1;
8543  __pyx_t_1 = 0;
8544 
8545  /* "(tree fragment)":7
8546  * state = (self.name,)
8547  * _dict = getattr(self, '__dict__', None)
8548  * if _dict is not None: # <<<<<<<<<<<<<<
8549  * state += (_dict,)
8550  * use_setstate = True
8551  */
8552  __Pyx_TraceLine(7,0,__PYX_ERR(1, 7, __pyx_L1_error))
8553  __pyx_t_2 = (__pyx_v__dict != Py_None);
8554  __pyx_t_3 = (__pyx_t_2 != 0);
8555  if (__pyx_t_3) {
8556 
8557  /* "(tree fragment)":8
8558  * _dict = getattr(self, '__dict__', None)
8559  * if _dict is not None:
8560  * state += (_dict,) # <<<<<<<<<<<<<<
8561  * use_setstate = True
8562  * else:
8563  */
8564  __Pyx_TraceLine(8,0,__PYX_ERR(1, 8, __pyx_L1_error))
8565  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
8566  __Pyx_GOTREF(__pyx_t_1);
8567  __Pyx_INCREF(__pyx_v__dict);
8568  __Pyx_GIVEREF(__pyx_v__dict);
8569  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
8570  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
8571  __Pyx_GOTREF(__pyx_t_4);
8572  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8573  __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
8574  __pyx_t_4 = 0;
8575 
8576  /* "(tree fragment)":9
8577  * if _dict is not None:
8578  * state += (_dict,)
8579  * use_setstate = True # <<<<<<<<<<<<<<
8580  * else:
8581  * use_setstate = self.name is not None
8582  */
8583  __Pyx_TraceLine(9,0,__PYX_ERR(1, 9, __pyx_L1_error))
8584  __pyx_v_use_setstate = 1;
8585 
8586  /* "(tree fragment)":7
8587  * state = (self.name,)
8588  * _dict = getattr(self, '__dict__', None)
8589  * if _dict is not None: # <<<<<<<<<<<<<<
8590  * state += (_dict,)
8591  * use_setstate = True
8592  */
8593  goto __pyx_L3;
8594  }
8595 
8596  /* "(tree fragment)":11
8597  * use_setstate = True
8598  * else:
8599  * use_setstate = self.name is not None # <<<<<<<<<<<<<<
8600  * if use_setstate:
8601  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
8602  */
8603  __Pyx_TraceLine(11,0,__PYX_ERR(1, 11, __pyx_L1_error))
8604  /*else*/ {
8605  __pyx_t_3 = (__pyx_v_self->name != Py_None);
8606  __pyx_v_use_setstate = __pyx_t_3;
8607  }
8608  __pyx_L3:;
8609 
8610  /* "(tree fragment)":12
8611  * else:
8612  * use_setstate = self.name is not None
8613  * if use_setstate: # <<<<<<<<<<<<<<
8614  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
8615  * else:
8616  */
8617  __Pyx_TraceLine(12,0,__PYX_ERR(1, 12, __pyx_L1_error))
8618  __pyx_t_3 = (__pyx_v_use_setstate != 0);
8619  if (__pyx_t_3) {
8620 
8621  /* "(tree fragment)":13
8622  * use_setstate = self.name is not None
8623  * if use_setstate:
8624  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<<
8625  * else:
8626  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
8627  */
8628  __Pyx_TraceLine(13,0,__PYX_ERR(1, 13, __pyx_L1_error))
8629  __Pyx_XDECREF(__pyx_r);
8630  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
8631  __Pyx_GOTREF(__pyx_t_4);
8632  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
8633  __Pyx_GOTREF(__pyx_t_1);
8634  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8635  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8636  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8637  __Pyx_INCREF(__pyx_int_184977713);
8638  __Pyx_GIVEREF(__pyx_int_184977713);
8639  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
8640  __Pyx_INCREF(Py_None);
8641  __Pyx_GIVEREF(Py_None);
8642  PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
8643  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
8644  __Pyx_GOTREF(__pyx_t_5);
8645  __Pyx_GIVEREF(__pyx_t_4);
8646  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
8647  __Pyx_GIVEREF(__pyx_t_1);
8648  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
8649  __Pyx_INCREF(__pyx_v_state);
8650  __Pyx_GIVEREF(__pyx_v_state);
8651  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
8652  __pyx_t_4 = 0;
8653  __pyx_t_1 = 0;
8654  __pyx_r = __pyx_t_5;
8655  __pyx_t_5 = 0;
8656  goto __pyx_L0;
8657 
8658  /* "(tree fragment)":12
8659  * else:
8660  * use_setstate = self.name is not None
8661  * if use_setstate: # <<<<<<<<<<<<<<
8662  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
8663  * else:
8664  */
8665  }
8666 
8667  /* "(tree fragment)":15
8668  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
8669  * else:
8670  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<<
8671  * def __setstate_cython__(self, __pyx_state):
8672  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
8673  */
8674  __Pyx_TraceLine(15,0,__PYX_ERR(1, 15, __pyx_L1_error))
8675  /*else*/ {
8676  __Pyx_XDECREF(__pyx_r);
8677  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
8678  __Pyx_GOTREF(__pyx_t_5);
8679  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
8680  __Pyx_GOTREF(__pyx_t_1);
8681  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8682  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8683  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8684  __Pyx_INCREF(__pyx_int_184977713);
8685  __Pyx_GIVEREF(__pyx_int_184977713);
8686  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
8687  __Pyx_INCREF(__pyx_v_state);
8688  __Pyx_GIVEREF(__pyx_v_state);
8689  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
8690  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
8691  __Pyx_GOTREF(__pyx_t_4);
8692  __Pyx_GIVEREF(__pyx_t_5);
8693  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
8694  __Pyx_GIVEREF(__pyx_t_1);
8695  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
8696  __pyx_t_5 = 0;
8697  __pyx_t_1 = 0;
8698  __pyx_r = __pyx_t_4;
8699  __pyx_t_4 = 0;
8700  goto __pyx_L0;
8701  }
8702 
8703  /* "(tree fragment)":1
8704  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8705  * cdef tuple state
8706  * cdef object _dict
8707  */
8708 
8709  /* function exit code */
8710  __pyx_L1_error:;
8711  __Pyx_XDECREF(__pyx_t_1);
8712  __Pyx_XDECREF(__pyx_t_4);
8713  __Pyx_XDECREF(__pyx_t_5);
8714  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8715  __pyx_r = NULL;
8716  __pyx_L0:;
8717  __Pyx_XDECREF(__pyx_v_state);
8718  __Pyx_XDECREF(__pyx_v__dict);
8719  __Pyx_XGIVEREF(__pyx_r);
8720  __Pyx_TraceReturn(__pyx_r, 0);
8721  __Pyx_RefNannyFinishContext();
8722  return __pyx_r;
8723 }
8724 
8725 /* "(tree fragment)":16
8726  * else:
8727  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
8728  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8729  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
8730  */
8731 
8732 /* Python wrapper */
8733 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
8734 static PyMethodDef __pyx_mdef___pyx_MemviewEnum_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0};
8735 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
8736  PyObject *__pyx_r = 0;
8737  __Pyx_RefNannyDeclarations
8738  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
8739  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
8740 
8741  /* function exit code */
8742  __Pyx_RefNannyFinishContext();
8743  return __pyx_r;
8744 }
8745 
8746 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
8747  PyObject *__pyx_r = NULL;
8748  __Pyx_TraceDeclarations
8749  __Pyx_RefNannyDeclarations
8750  PyObject *__pyx_t_1 = NULL;
8751  int __pyx_lineno = 0;
8752  const char *__pyx_filename = NULL;
8753  int __pyx_clineno = 0;
8754  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
8755  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
8756 
8757  /* "(tree fragment)":17
8758  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
8759  * def __setstate_cython__(self, __pyx_state):
8760  * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
8761  */
8762  __Pyx_TraceLine(17,0,__PYX_ERR(1, 17, __pyx_L1_error))
8763  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
8764  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
8765  __Pyx_GOTREF(__pyx_t_1);
8766  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8767 
8768  /* "(tree fragment)":16
8769  * else:
8770  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
8771  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8772  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
8773  */
8774 
8775  /* function exit code */
8776  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8777  goto __pyx_L0;
8778  __pyx_L1_error:;
8779  __Pyx_XDECREF(__pyx_t_1);
8780  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8781  __pyx_r = NULL;
8782  __pyx_L0:;
8783  __Pyx_XGIVEREF(__pyx_r);
8784  __Pyx_TraceReturn(__pyx_r, 0);
8785  __Pyx_RefNannyFinishContext();
8786  return __pyx_r;
8787 }
8788 
8789 /* "View.MemoryView":299
8790  *
8791  * @cname('__pyx_align_pointer')
8792  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
8793  * "Align pointer memory on a given boundary"
8794  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
8795  */
8796 
8797 static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
8798  Py_intptr_t __pyx_v_aligned_p;
8799  size_t __pyx_v_offset;
8800  void *__pyx_r;
8801  __Pyx_TraceDeclarations
8802  int __pyx_t_1;
8803  int __pyx_lineno = 0;
8804  const char *__pyx_filename = NULL;
8805  int __pyx_clineno = 0;
8806  __Pyx_TraceCall("align_pointer", __pyx_f[1], 299, 1, __PYX_ERR(1, 299, __pyx_L1_error));
8807 
8808  /* "View.MemoryView":301
8809  * cdef void *align_pointer(void *memory, size_t alignment) nogil:
8810  * "Align pointer memory on a given boundary"
8811  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory # <<<<<<<<<<<<<<
8812  * cdef size_t offset
8813  *
8814  */
8815  __Pyx_TraceLine(301,1,__PYX_ERR(1, 301, __pyx_L1_error))
8816  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
8817 
8818  /* "View.MemoryView":305
8819  *
8820  * with cython.cdivision(True):
8821  * offset = aligned_p % alignment # <<<<<<<<<<<<<<
8822  *
8823  * if offset > 0:
8824  */
8825  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
8826 
8827  /* "View.MemoryView":307
8828  * offset = aligned_p % alignment
8829  *
8830  * if offset > 0: # <<<<<<<<<<<<<<
8831  * aligned_p += alignment - offset
8832  *
8833  */
8834  __Pyx_TraceLine(307,1,__PYX_ERR(1, 307, __pyx_L1_error))
8835  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
8836  if (__pyx_t_1) {
8837 
8838  /* "View.MemoryView":308
8839  *
8840  * if offset > 0:
8841  * aligned_p += alignment - offset # <<<<<<<<<<<<<<
8842  *
8843  * return <void *> aligned_p
8844  */
8845  __Pyx_TraceLine(308,1,__PYX_ERR(1, 308, __pyx_L1_error))
8846  __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
8847 
8848  /* "View.MemoryView":307
8849  * offset = aligned_p % alignment
8850  *
8851  * if offset > 0: # <<<<<<<<<<<<<<
8852  * aligned_p += alignment - offset
8853  *
8854  */
8855  }
8856 
8857  /* "View.MemoryView":310
8858  * aligned_p += alignment - offset
8859  *
8860  * return <void *> aligned_p # <<<<<<<<<<<<<<
8861  *
8862  *
8863  */
8864  __Pyx_TraceLine(310,1,__PYX_ERR(1, 310, __pyx_L1_error))
8865  __pyx_r = ((void *)__pyx_v_aligned_p);
8866  goto __pyx_L0;
8867 
8868  /* "View.MemoryView":299
8869  *
8870  * @cname('__pyx_align_pointer')
8871  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
8872  * "Align pointer memory on a given boundary"
8873  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
8874  */
8875 
8876  /* function exit code */
8877  __pyx_L1_error:;
8878  __Pyx_WriteUnraisable("View.MemoryView.align_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
8879  __pyx_r = 0;
8880  __pyx_L0:;
8881  __Pyx_TraceReturn(Py_None, 1);
8882  return __pyx_r;
8883 }
8884 
8885 /* "View.MemoryView":346
8886  * cdef __Pyx_TypeInfo *typeinfo
8887  *
8888  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
8889  * self.obj = obj
8890  * self.flags = flags
8891  */
8892 
8893 /* Python wrapper */
8894 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8895 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8896  PyObject *__pyx_v_obj = 0;
8897  int __pyx_v_flags;
8898  int __pyx_v_dtype_is_object;
8899  int __pyx_lineno = 0;
8900  const char *__pyx_filename = NULL;
8901  int __pyx_clineno = 0;
8902  int __pyx_r;
8903  __Pyx_RefNannyDeclarations
8904  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
8905  {
8906  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
8907  PyObject* values[3] = {0,0,0};
8908  if (unlikely(__pyx_kwds)) {
8909  Py_ssize_t kw_args;
8910  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8911  switch (pos_args) {
8912  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8913  CYTHON_FALLTHROUGH;
8914  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8915  CYTHON_FALLTHROUGH;
8916  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8917  CYTHON_FALLTHROUGH;
8918  case 0: break;
8919  default: goto __pyx_L5_argtuple_error;
8920  }
8921  kw_args = PyDict_Size(__pyx_kwds);
8922  switch (pos_args) {
8923  case 0:
8924  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
8925  else goto __pyx_L5_argtuple_error;
8926  CYTHON_FALLTHROUGH;
8927  case 1:
8928  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
8929  else {
8930  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 346, __pyx_L3_error)
8931  }
8932  CYTHON_FALLTHROUGH;
8933  case 2:
8934  if (kw_args > 0) {
8935  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
8936  if (value) { values[2] = value; kw_args--; }
8937  }
8938  }
8939  if (unlikely(kw_args > 0)) {
8940  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 346, __pyx_L3_error)
8941  }
8942  } else {
8943  switch (PyTuple_GET_SIZE(__pyx_args)) {
8944  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8945  CYTHON_FALLTHROUGH;
8946  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8947  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8948  break;
8949  default: goto __pyx_L5_argtuple_error;
8950  }
8951  }
8952  __pyx_v_obj = values[0];
8953  __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 346, __pyx_L3_error)
8954  if (values[2]) {
8955  __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 346, __pyx_L3_error)
8956  } else {
8957  __pyx_v_dtype_is_object = ((int)0);
8958  }
8959  }
8960  goto __pyx_L4_argument_unpacking_done;
8961  __pyx_L5_argtuple_error:;
8962  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 346, __pyx_L3_error)
8963  __pyx_L3_error:;
8964  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8965  __Pyx_RefNannyFinishContext();
8966  return -1;
8967  __pyx_L4_argument_unpacking_done:;
8968  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
8969 
8970  /* function exit code */
8971  __Pyx_RefNannyFinishContext();
8972  return __pyx_r;
8973 }
8974 
8975 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
8976  int __pyx_r;
8977  __Pyx_TraceDeclarations
8978  __Pyx_RefNannyDeclarations
8979  int __pyx_t_1;
8980  int __pyx_t_2;
8981  int __pyx_t_3;
8982  int __pyx_t_4;
8983  int __pyx_lineno = 0;
8984  const char *__pyx_filename = NULL;
8985  int __pyx_clineno = 0;
8986  __Pyx_RefNannySetupContext("__cinit__", 0);
8987  __Pyx_TraceCall("__cinit__", __pyx_f[1], 346, 0, __PYX_ERR(1, 346, __pyx_L1_error));
8988 
8989  /* "View.MemoryView":347
8990  *
8991  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
8992  * self.obj = obj # <<<<<<<<<<<<<<
8993  * self.flags = flags
8994  * if type(self) is memoryview or obj is not None:
8995  */
8996  __Pyx_TraceLine(347,0,__PYX_ERR(1, 347, __pyx_L1_error))
8997  __Pyx_INCREF(__pyx_v_obj);
8998  __Pyx_GIVEREF(__pyx_v_obj);
8999  __Pyx_GOTREF(__pyx_v_self->obj);
9000  __Pyx_DECREF(__pyx_v_self->obj);
9001  __pyx_v_self->obj = __pyx_v_obj;
9002 
9003  /* "View.MemoryView":348
9004  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
9005  * self.obj = obj
9006  * self.flags = flags # <<<<<<<<<<<<<<
9007  * if type(self) is memoryview or obj is not None:
9008  * __Pyx_GetBuffer(obj, &self.view, flags)
9009  */
9010  __Pyx_TraceLine(348,0,__PYX_ERR(1, 348, __pyx_L1_error))
9011  __pyx_v_self->flags = __pyx_v_flags;
9012 
9013  /* "View.MemoryView":349
9014  * self.obj = obj
9015  * self.flags = flags
9016  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
9017  * __Pyx_GetBuffer(obj, &self.view, flags)
9018  * if <PyObject *> self.view.obj == NULL:
9019  */
9020  __Pyx_TraceLine(349,0,__PYX_ERR(1, 349, __pyx_L1_error))
9021  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
9022  __pyx_t_3 = (__pyx_t_2 != 0);
9023  if (!__pyx_t_3) {
9024  } else {
9025  __pyx_t_1 = __pyx_t_3;
9026  goto __pyx_L4_bool_binop_done;
9027  }
9028  __pyx_t_3 = (__pyx_v_obj != Py_None);
9029  __pyx_t_2 = (__pyx_t_3 != 0);
9030  __pyx_t_1 = __pyx_t_2;
9031  __pyx_L4_bool_binop_done:;
9032  if (__pyx_t_1) {
9033 
9034  /* "View.MemoryView":350
9035  * self.flags = flags
9036  * if type(self) is memoryview or obj is not None:
9037  * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
9038  * if <PyObject *> self.view.obj == NULL:
9039  * (<__pyx_buffer *> &self.view).obj = Py_None
9040  */
9041  __Pyx_TraceLine(350,0,__PYX_ERR(1, 350, __pyx_L1_error))
9042  __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 350, __pyx_L1_error)
9043 
9044  /* "View.MemoryView":351
9045  * if type(self) is memoryview or obj is not None:
9046  * __Pyx_GetBuffer(obj, &self.view, flags)
9047  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
9048  * (<__pyx_buffer *> &self.view).obj = Py_None
9049  * Py_INCREF(Py_None)
9050  */
9051  __Pyx_TraceLine(351,0,__PYX_ERR(1, 351, __pyx_L1_error))
9052  __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
9053  if (__pyx_t_1) {
9054 
9055  /* "View.MemoryView":352
9056  * __Pyx_GetBuffer(obj, &self.view, flags)
9057  * if <PyObject *> self.view.obj == NULL:
9058  * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
9059  * Py_INCREF(Py_None)
9060  *
9061  */
9062  __Pyx_TraceLine(352,0,__PYX_ERR(1, 352, __pyx_L1_error))
9063  ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
9064 
9065  /* "View.MemoryView":353
9066  * if <PyObject *> self.view.obj == NULL:
9067  * (<__pyx_buffer *> &self.view).obj = Py_None
9068  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
9069  *
9070  * if not __PYX_CYTHON_ATOMICS_ENABLED():
9071  */
9072  __Pyx_TraceLine(353,0,__PYX_ERR(1, 353, __pyx_L1_error))
9073  Py_INCREF(Py_None);
9074 
9075  /* "View.MemoryView":351
9076  * if type(self) is memoryview or obj is not None:
9077  * __Pyx_GetBuffer(obj, &self.view, flags)
9078  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
9079  * (<__pyx_buffer *> &self.view).obj = Py_None
9080  * Py_INCREF(Py_None)
9081  */
9082  }
9083 
9084  /* "View.MemoryView":349
9085  * self.obj = obj
9086  * self.flags = flags
9087  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
9088  * __Pyx_GetBuffer(obj, &self.view, flags)
9089  * if <PyObject *> self.view.obj == NULL:
9090  */
9091  }
9092 
9093  /* "View.MemoryView":355
9094  * Py_INCREF(Py_None)
9095  *
9096  * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<<
9097  * global __pyx_memoryview_thread_locks_used
9098  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
9099  */
9100  __Pyx_TraceLine(355,0,__PYX_ERR(1, 355, __pyx_L1_error))
9101  __pyx_t_1 = ((!(__PYX_CYTHON_ATOMICS_ENABLED() != 0)) != 0);
9102  if (__pyx_t_1) {
9103 
9104  /* "View.MemoryView":357
9105  * if not __PYX_CYTHON_ATOMICS_ENABLED():
9106  * global __pyx_memoryview_thread_locks_used
9107  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
9108  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
9109  * __pyx_memoryview_thread_locks_used += 1
9110  */
9111  __Pyx_TraceLine(357,0,__PYX_ERR(1, 357, __pyx_L1_error))
9112  __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
9113  if (__pyx_t_1) {
9114 
9115  /* "View.MemoryView":358
9116  * global __pyx_memoryview_thread_locks_used
9117  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
9118  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
9119  * __pyx_memoryview_thread_locks_used += 1
9120  * if self.lock is NULL:
9121  */
9122  __Pyx_TraceLine(358,0,__PYX_ERR(1, 358, __pyx_L1_error))
9123  __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
9124 
9125  /* "View.MemoryView":359
9126  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
9127  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
9128  * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
9129  * if self.lock is NULL:
9130  * self.lock = PyThread_allocate_lock()
9131  */
9132  __Pyx_TraceLine(359,0,__PYX_ERR(1, 359, __pyx_L1_error))
9133  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
9134 
9135  /* "View.MemoryView":357
9136  * if not __PYX_CYTHON_ATOMICS_ENABLED():
9137  * global __pyx_memoryview_thread_locks_used
9138  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
9139  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
9140  * __pyx_memoryview_thread_locks_used += 1
9141  */
9142  }
9143 
9144  /* "View.MemoryView":360
9145  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
9146  * __pyx_memoryview_thread_locks_used += 1
9147  * if self.lock is NULL: # <<<<<<<<<<<<<<
9148  * self.lock = PyThread_allocate_lock()
9149  * if self.lock is NULL:
9150  */
9151  __Pyx_TraceLine(360,0,__PYX_ERR(1, 360, __pyx_L1_error))
9152  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
9153  if (__pyx_t_1) {
9154 
9155  /* "View.MemoryView":361
9156  * __pyx_memoryview_thread_locks_used += 1
9157  * if self.lock is NULL:
9158  * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
9159  * if self.lock is NULL:
9160  * raise MemoryError
9161  */
9162  __Pyx_TraceLine(361,0,__PYX_ERR(1, 361, __pyx_L1_error))
9163  __pyx_v_self->lock = PyThread_allocate_lock();
9164 
9165  /* "View.MemoryView":362
9166  * if self.lock is NULL:
9167  * self.lock = PyThread_allocate_lock()
9168  * if self.lock is NULL: # <<<<<<<<<<<<<<
9169  * raise MemoryError
9170  *
9171  */
9172  __Pyx_TraceLine(362,0,__PYX_ERR(1, 362, __pyx_L1_error))
9173  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
9174  if (unlikely(__pyx_t_1)) {
9175 
9176  /* "View.MemoryView":363
9177  * self.lock = PyThread_allocate_lock()
9178  * if self.lock is NULL:
9179  * raise MemoryError # <<<<<<<<<<<<<<
9180  *
9181  * if flags & PyBUF_FORMAT:
9182  */
9183  __Pyx_TraceLine(363,0,__PYX_ERR(1, 363, __pyx_L1_error))
9184  PyErr_NoMemory(); __PYX_ERR(1, 363, __pyx_L1_error)
9185 
9186  /* "View.MemoryView":362
9187  * if self.lock is NULL:
9188  * self.lock = PyThread_allocate_lock()
9189  * if self.lock is NULL: # <<<<<<<<<<<<<<
9190  * raise MemoryError
9191  *
9192  */
9193  }
9194 
9195  /* "View.MemoryView":360
9196  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
9197  * __pyx_memoryview_thread_locks_used += 1
9198  * if self.lock is NULL: # <<<<<<<<<<<<<<
9199  * self.lock = PyThread_allocate_lock()
9200  * if self.lock is NULL:
9201  */
9202  }
9203 
9204  /* "View.MemoryView":355
9205  * Py_INCREF(Py_None)
9206  *
9207  * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<<
9208  * global __pyx_memoryview_thread_locks_used
9209  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
9210  */
9211  }
9212 
9213  /* "View.MemoryView":365
9214  * raise MemoryError
9215  *
9216  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
9217  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
9218  * else:
9219  */
9220  __Pyx_TraceLine(365,0,__PYX_ERR(1, 365, __pyx_L1_error))
9221  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
9222  if (__pyx_t_1) {
9223 
9224  /* "View.MemoryView":366
9225  *
9226  * if flags & PyBUF_FORMAT:
9227  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
9228  * else:
9229  * self.dtype_is_object = dtype_is_object
9230  */
9231  __Pyx_TraceLine(366,0,__PYX_ERR(1, 366, __pyx_L1_error))
9232  __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
9233  if (__pyx_t_2) {
9234  } else {
9235  __pyx_t_1 = __pyx_t_2;
9236  goto __pyx_L12_bool_binop_done;
9237  }
9238  __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
9239  __pyx_t_1 = __pyx_t_2;
9240  __pyx_L12_bool_binop_done:;
9241  __pyx_v_self->dtype_is_object = __pyx_t_1;
9242 
9243  /* "View.MemoryView":365
9244  * raise MemoryError
9245  *
9246  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
9247  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
9248  * else:
9249  */
9250  goto __pyx_L11;
9251  }
9252 
9253  /* "View.MemoryView":368
9254  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
9255  * else:
9256  * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
9257  *
9258  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
9259  */
9260  __Pyx_TraceLine(368,0,__PYX_ERR(1, 368, __pyx_L1_error))
9261  /*else*/ {
9262  __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
9263  }
9264  __pyx_L11:;
9265 
9266  /* "View.MemoryView":370
9267  * self.dtype_is_object = dtype_is_object
9268  *
9269  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<<
9270  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
9271  * self.typeinfo = NULL
9272  */
9273  __Pyx_TraceLine(370,0,__PYX_ERR(1, 370, __pyx_L1_error))
9274  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
9275 
9276  /* "View.MemoryView":372
9277  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
9278  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
9279  * self.typeinfo = NULL # <<<<<<<<<<<<<<
9280  *
9281  * def __dealloc__(memoryview self):
9282  */
9283  __Pyx_TraceLine(372,0,__PYX_ERR(1, 372, __pyx_L1_error))
9284  __pyx_v_self->typeinfo = NULL;
9285 
9286  /* "View.MemoryView":346
9287  * cdef __Pyx_TypeInfo *typeinfo
9288  *
9289  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
9290  * self.obj = obj
9291  * self.flags = flags
9292  */
9293 
9294  /* function exit code */
9295  __pyx_r = 0;
9296  goto __pyx_L0;
9297  __pyx_L1_error:;
9298  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9299  __pyx_r = -1;
9300  __pyx_L0:;
9301  __Pyx_TraceReturn(Py_None, 0);
9302  __Pyx_RefNannyFinishContext();
9303  return __pyx_r;
9304 }
9305 
9306 /* "View.MemoryView":374
9307  * self.typeinfo = NULL
9308  *
9309  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
9310  * if self.obj is not None:
9311  * __Pyx_ReleaseBuffer(&self.view)
9312  */
9313 
9314 /* Python wrapper */
9315 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
9316 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
9317  __Pyx_RefNannyDeclarations
9318  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
9319  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
9320 
9321  /* function exit code */
9322  __Pyx_RefNannyFinishContext();
9323 }
9324 
9325 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
9326  int __pyx_v_i;
9327  __Pyx_TraceDeclarations
9328  __Pyx_RefNannyDeclarations
9329  int __pyx_t_1;
9330  int __pyx_t_2;
9331  int __pyx_t_3;
9332  int __pyx_t_4;
9333  int __pyx_t_5;
9334  PyThread_type_lock __pyx_t_6;
9335  PyThread_type_lock __pyx_t_7;
9336  int __pyx_lineno = 0;
9337  const char *__pyx_filename = NULL;
9338  int __pyx_clineno = 0;
9339  __Pyx_RefNannySetupContext("__dealloc__", 0);
9340  __Pyx_TraceCall("__dealloc__", __pyx_f[1], 374, 0, __PYX_ERR(1, 374, __pyx_L1_error));
9341 
9342  /* "View.MemoryView":375
9343  *
9344  * def __dealloc__(memoryview self):
9345  * if self.obj is not None: # <<<<<<<<<<<<<<
9346  * __Pyx_ReleaseBuffer(&self.view)
9347  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
9348  */
9349  __Pyx_TraceLine(375,0,__PYX_ERR(1, 375, __pyx_L1_error))
9350  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
9351  __pyx_t_2 = (__pyx_t_1 != 0);
9352  if (__pyx_t_2) {
9353 
9354  /* "View.MemoryView":376
9355  * def __dealloc__(memoryview self):
9356  * if self.obj is not None:
9357  * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
9358  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
9359  *
9360  */
9361  __Pyx_TraceLine(376,0,__PYX_ERR(1, 376, __pyx_L1_error))
9362  __Pyx_ReleaseBuffer((&__pyx_v_self->view));
9363 
9364  /* "View.MemoryView":375
9365  *
9366  * def __dealloc__(memoryview self):
9367  * if self.obj is not None: # <<<<<<<<<<<<<<
9368  * __Pyx_ReleaseBuffer(&self.view)
9369  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
9370  */
9371  goto __pyx_L3;
9372  }
9373 
9374  /* "View.MemoryView":377
9375  * if self.obj is not None:
9376  * __Pyx_ReleaseBuffer(&self.view)
9377  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
9378  *
9379  * (<__pyx_buffer *> &self.view).obj = NULL
9380  */
9381  __Pyx_TraceLine(377,0,__PYX_ERR(1, 377, __pyx_L1_error))
9382  __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
9383  if (__pyx_t_2) {
9384 
9385  /* "View.MemoryView":379
9386  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
9387  *
9388  * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<<
9389  * Py_DECREF(Py_None)
9390  *
9391  */
9392  __Pyx_TraceLine(379,0,__PYX_ERR(1, 379, __pyx_L1_error))
9393  ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
9394 
9395  /* "View.MemoryView":380
9396  *
9397  * (<__pyx_buffer *> &self.view).obj = NULL
9398  * Py_DECREF(Py_None) # <<<<<<<<<<<<<<
9399  *
9400  * cdef int i
9401  */
9402  __Pyx_TraceLine(380,0,__PYX_ERR(1, 380, __pyx_L1_error))
9403  Py_DECREF(Py_None);
9404 
9405  /* "View.MemoryView":377
9406  * if self.obj is not None:
9407  * __Pyx_ReleaseBuffer(&self.view)
9408  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
9409  *
9410  * (<__pyx_buffer *> &self.view).obj = NULL
9411  */
9412  }
9413  __pyx_L3:;
9414 
9415  /* "View.MemoryView":384
9416  * cdef int i
9417  * global __pyx_memoryview_thread_locks_used
9418  * if self.lock != NULL: # <<<<<<<<<<<<<<
9419  * for i in range(__pyx_memoryview_thread_locks_used):
9420  * if __pyx_memoryview_thread_locks[i] is self.lock:
9421  */
9422  __Pyx_TraceLine(384,0,__PYX_ERR(1, 384, __pyx_L1_error))
9423  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
9424  if (__pyx_t_2) {
9425 
9426  /* "View.MemoryView":385
9427  * global __pyx_memoryview_thread_locks_used
9428  * if self.lock != NULL:
9429  * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
9430  * if __pyx_memoryview_thread_locks[i] is self.lock:
9431  * __pyx_memoryview_thread_locks_used -= 1
9432  */
9433  __Pyx_TraceLine(385,0,__PYX_ERR(1, 385, __pyx_L1_error))
9434  __pyx_t_3 = __pyx_memoryview_thread_locks_used;
9435  __pyx_t_4 = __pyx_t_3;
9436  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
9437  __pyx_v_i = __pyx_t_5;
9438 
9439  /* "View.MemoryView":386
9440  * if self.lock != NULL:
9441  * for i in range(__pyx_memoryview_thread_locks_used):
9442  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
9443  * __pyx_memoryview_thread_locks_used -= 1
9444  * if i != __pyx_memoryview_thread_locks_used:
9445  */
9446  __Pyx_TraceLine(386,0,__PYX_ERR(1, 386, __pyx_L1_error))
9447  __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
9448  if (__pyx_t_2) {
9449 
9450  /* "View.MemoryView":387
9451  * for i in range(__pyx_memoryview_thread_locks_used):
9452  * if __pyx_memoryview_thread_locks[i] is self.lock:
9453  * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
9454  * if i != __pyx_memoryview_thread_locks_used:
9455  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
9456  */
9457  __Pyx_TraceLine(387,0,__PYX_ERR(1, 387, __pyx_L1_error))
9458  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
9459 
9460  /* "View.MemoryView":388
9461  * if __pyx_memoryview_thread_locks[i] is self.lock:
9462  * __pyx_memoryview_thread_locks_used -= 1
9463  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
9464  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
9465  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
9466  */
9467  __Pyx_TraceLine(388,0,__PYX_ERR(1, 388, __pyx_L1_error))
9468  __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
9469  if (__pyx_t_2) {
9470 
9471  /* "View.MemoryView":390
9472  * if i != __pyx_memoryview_thread_locks_used:
9473  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
9474  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
9475  * break
9476  * else:
9477  */
9478  __Pyx_TraceLine(390,0,__PYX_ERR(1, 390, __pyx_L1_error))
9479  __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
9480  __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
9481 
9482  /* "View.MemoryView":389
9483  * __pyx_memoryview_thread_locks_used -= 1
9484  * if i != __pyx_memoryview_thread_locks_used:
9485  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
9486  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
9487  * break
9488  */
9489  __Pyx_TraceLine(389,0,__PYX_ERR(1, 389, __pyx_L1_error))
9490  (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
9491  (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
9492 
9493  /* "View.MemoryView":388
9494  * if __pyx_memoryview_thread_locks[i] is self.lock:
9495  * __pyx_memoryview_thread_locks_used -= 1
9496  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
9497  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
9498  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
9499  */
9500  }
9501 
9502  /* "View.MemoryView":391
9503  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
9504  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
9505  * break # <<<<<<<<<<<<<<
9506  * else:
9507  * PyThread_free_lock(self.lock)
9508  */
9509  __Pyx_TraceLine(391,0,__PYX_ERR(1, 391, __pyx_L1_error))
9510  goto __pyx_L6_break;
9511 
9512  /* "View.MemoryView":386
9513  * if self.lock != NULL:
9514  * for i in range(__pyx_memoryview_thread_locks_used):
9515  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
9516  * __pyx_memoryview_thread_locks_used -= 1
9517  * if i != __pyx_memoryview_thread_locks_used:
9518  */
9519  }
9520  }
9521  /*else*/ {
9522 
9523  /* "View.MemoryView":393
9524  * break
9525  * else:
9526  * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
9527  *
9528  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
9529  */
9530  __Pyx_TraceLine(393,0,__PYX_ERR(1, 393, __pyx_L1_error))
9531  PyThread_free_lock(__pyx_v_self->lock);
9532  }
9533  __pyx_L6_break:;
9534 
9535  /* "View.MemoryView":384
9536  * cdef int i
9537  * global __pyx_memoryview_thread_locks_used
9538  * if self.lock != NULL: # <<<<<<<<<<<<<<
9539  * for i in range(__pyx_memoryview_thread_locks_used):
9540  * if __pyx_memoryview_thread_locks[i] is self.lock:
9541  */
9542  }
9543 
9544  /* "View.MemoryView":374
9545  * self.typeinfo = NULL
9546  *
9547  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
9548  * if self.obj is not None:
9549  * __Pyx_ReleaseBuffer(&self.view)
9550  */
9551 
9552  /* function exit code */
9553  goto __pyx_L0;
9554  __pyx_L1_error:;
9555  __Pyx_WriteUnraisable("View.MemoryView.memoryview.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
9556  __pyx_L0:;
9557  __Pyx_TraceReturn(Py_None, 0);
9558  __Pyx_RefNannyFinishContext();
9559 }
9560 
9561 /* "View.MemoryView":395
9562  * PyThread_free_lock(self.lock)
9563  *
9564  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
9565  * cdef Py_ssize_t dim
9566  * cdef char *itemp = <char *> self.view.buf
9567  */
9568 
9569 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
9570  Py_ssize_t __pyx_v_dim;
9571  char *__pyx_v_itemp;
9572  PyObject *__pyx_v_idx = NULL;
9573  char *__pyx_r;
9574  __Pyx_TraceDeclarations
9575  __Pyx_RefNannyDeclarations
9576  Py_ssize_t __pyx_t_1;
9577  PyObject *__pyx_t_2 = NULL;
9578  Py_ssize_t __pyx_t_3;
9579  PyObject *(*__pyx_t_4)(PyObject *);
9580  PyObject *__pyx_t_5 = NULL;
9581  Py_ssize_t __pyx_t_6;
9582  char *__pyx_t_7;
9583  int __pyx_lineno = 0;
9584  const char *__pyx_filename = NULL;
9585  int __pyx_clineno = 0;
9586  __Pyx_RefNannySetupContext("get_item_pointer", 0);
9587  __Pyx_TraceCall("get_item_pointer", __pyx_f[1], 395, 0, __PYX_ERR(1, 395, __pyx_L1_error));
9588 
9589  /* "View.MemoryView":397
9590  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
9591  * cdef Py_ssize_t dim
9592  * cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
9593  *
9594  * for dim, idx in enumerate(index):
9595  */
9596  __Pyx_TraceLine(397,0,__PYX_ERR(1, 397, __pyx_L1_error))
9597  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
9598 
9599  /* "View.MemoryView":399
9600  * cdef char *itemp = <char *> self.view.buf
9601  *
9602  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
9603  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
9604  *
9605  */
9606  __Pyx_TraceLine(399,0,__PYX_ERR(1, 399, __pyx_L1_error))
9607  __pyx_t_1 = 0;
9608  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
9609  __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
9610  __pyx_t_4 = NULL;
9611  } else {
9612  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 399, __pyx_L1_error)
9613  __Pyx_GOTREF(__pyx_t_2);
9614  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 399, __pyx_L1_error)
9615  }
9616  for (;;) {
9617  if (likely(!__pyx_t_4)) {
9618  if (likely(PyList_CheckExact(__pyx_t_2))) {
9619  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
9620  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9621  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 399, __pyx_L1_error)
9622  #else
9623  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 399, __pyx_L1_error)
9624  __Pyx_GOTREF(__pyx_t_5);
9625  #endif
9626  } else {
9627  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
9628  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9629  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 399, __pyx_L1_error)
9630  #else
9631  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 399, __pyx_L1_error)
9632  __Pyx_GOTREF(__pyx_t_5);
9633  #endif
9634  }
9635  } else {
9636  __pyx_t_5 = __pyx_t_4(__pyx_t_2);
9637  if (unlikely(!__pyx_t_5)) {
9638  PyObject* exc_type = PyErr_Occurred();
9639  if (exc_type) {
9640  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9641  else __PYX_ERR(1, 399, __pyx_L1_error)
9642  }
9643  break;
9644  }
9645  __Pyx_GOTREF(__pyx_t_5);
9646  }
9647  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
9648  __pyx_t_5 = 0;
9649  __pyx_v_dim = __pyx_t_1;
9650  __pyx_t_1 = (__pyx_t_1 + 1);
9651 
9652  /* "View.MemoryView":400
9653  *
9654  * for dim, idx in enumerate(index):
9655  * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
9656  *
9657  * return itemp
9658  */
9659  __Pyx_TraceLine(400,0,__PYX_ERR(1, 400, __pyx_L1_error))
9660  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 400, __pyx_L1_error)
9661  __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 400, __pyx_L1_error)
9662  __pyx_v_itemp = __pyx_t_7;
9663 
9664  /* "View.MemoryView":399
9665  * cdef char *itemp = <char *> self.view.buf
9666  *
9667  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
9668  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
9669  *
9670  */
9671  __Pyx_TraceLine(399,0,__PYX_ERR(1, 399, __pyx_L1_error))
9672  }
9673  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9674 
9675  /* "View.MemoryView":402
9676  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
9677  *
9678  * return itemp # <<<<<<<<<<<<<<
9679  *
9680  *
9681  */
9682  __Pyx_TraceLine(402,0,__PYX_ERR(1, 402, __pyx_L1_error))
9683  __pyx_r = __pyx_v_itemp;
9684  goto __pyx_L0;
9685 
9686  /* "View.MemoryView":395
9687  * PyThread_free_lock(self.lock)
9688  *
9689  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
9690  * cdef Py_ssize_t dim
9691  * cdef char *itemp = <char *> self.view.buf
9692  */
9693 
9694  /* function exit code */
9695  __pyx_L1_error:;
9696  __Pyx_XDECREF(__pyx_t_2);
9697  __Pyx_XDECREF(__pyx_t_5);
9698  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
9699  __pyx_r = NULL;
9700  __pyx_L0:;
9701  __Pyx_XDECREF(__pyx_v_idx);
9702  __Pyx_TraceReturn(Py_None, 0);
9703  __Pyx_RefNannyFinishContext();
9704  return __pyx_r;
9705 }
9706 
9707 /* "View.MemoryView":405
9708  *
9709  *
9710  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
9711  * if index is Ellipsis:
9712  * return self
9713  */
9714 
9715 /* Python wrapper */
9716 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
9717 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
9718  PyObject *__pyx_r = 0;
9719  __Pyx_RefNannyDeclarations
9720  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
9721  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
9722 
9723  /* function exit code */
9724  __Pyx_RefNannyFinishContext();
9725  return __pyx_r;
9726 }
9727 
9728 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
9729  PyObject *__pyx_v_have_slices = NULL;
9730  PyObject *__pyx_v_indices = NULL;
9731  char *__pyx_v_itemp;
9732  PyObject *__pyx_r = NULL;
9733  __Pyx_TraceDeclarations
9734  __Pyx_RefNannyDeclarations
9735  int __pyx_t_1;
9736  int __pyx_t_2;
9737  PyObject *__pyx_t_3 = NULL;
9738  PyObject *__pyx_t_4 = NULL;
9739  PyObject *__pyx_t_5 = NULL;
9740  char *__pyx_t_6;
9741  int __pyx_lineno = 0;
9742  const char *__pyx_filename = NULL;
9743  int __pyx_clineno = 0;
9744  __Pyx_RefNannySetupContext("__getitem__", 0);
9745  __Pyx_TraceCall("__getitem__", __pyx_f[1], 405, 0, __PYX_ERR(1, 405, __pyx_L1_error));
9746 
9747  /* "View.MemoryView":406
9748  *
9749  * def __getitem__(memoryview self, object index):
9750  * if index is Ellipsis: # <<<<<<<<<<<<<<
9751  * return self
9752  *
9753  */
9754  __Pyx_TraceLine(406,0,__PYX_ERR(1, 406, __pyx_L1_error))
9755  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
9756  __pyx_t_2 = (__pyx_t_1 != 0);
9757  if (__pyx_t_2) {
9758 
9759  /* "View.MemoryView":407
9760  * def __getitem__(memoryview self, object index):
9761  * if index is Ellipsis:
9762  * return self # <<<<<<<<<<<<<<
9763  *
9764  * have_slices, indices = _unellipsify(index, self.view.ndim)
9765  */
9766  __Pyx_TraceLine(407,0,__PYX_ERR(1, 407, __pyx_L1_error))
9767  __Pyx_XDECREF(__pyx_r);
9768  __Pyx_INCREF(((PyObject *)__pyx_v_self));
9769  __pyx_r = ((PyObject *)__pyx_v_self);
9770  goto __pyx_L0;
9771 
9772  /* "View.MemoryView":406
9773  *
9774  * def __getitem__(memoryview self, object index):
9775  * if index is Ellipsis: # <<<<<<<<<<<<<<
9776  * return self
9777  *
9778  */
9779  }
9780 
9781  /* "View.MemoryView":409
9782  * return self
9783  *
9784  * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
9785  *
9786  * cdef char *itemp
9787  */
9788  __Pyx_TraceLine(409,0,__PYX_ERR(1, 409, __pyx_L1_error))
9789  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 409, __pyx_L1_error)
9790  __Pyx_GOTREF(__pyx_t_3);
9791  if (likely(__pyx_t_3 != Py_None)) {
9792  PyObject* sequence = __pyx_t_3;
9793  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
9794  if (unlikely(size != 2)) {
9795  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
9796  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
9797  __PYX_ERR(1, 409, __pyx_L1_error)
9798  }
9799  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9800  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
9801  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
9802  __Pyx_INCREF(__pyx_t_4);
9803  __Pyx_INCREF(__pyx_t_5);
9804  #else
9805  __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 409, __pyx_L1_error)
9806  __Pyx_GOTREF(__pyx_t_4);
9807  __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 409, __pyx_L1_error)
9808  __Pyx_GOTREF(__pyx_t_5);
9809  #endif
9810  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9811  } else {
9812  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 409, __pyx_L1_error)
9813  }
9814  __pyx_v_have_slices = __pyx_t_4;
9815  __pyx_t_4 = 0;
9816  __pyx_v_indices = __pyx_t_5;
9817  __pyx_t_5 = 0;
9818 
9819  /* "View.MemoryView":412
9820  *
9821  * cdef char *itemp
9822  * if have_slices: # <<<<<<<<<<<<<<
9823  * return memview_slice(self, indices)
9824  * else:
9825  */
9826  __Pyx_TraceLine(412,0,__PYX_ERR(1, 412, __pyx_L1_error))
9827  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 412, __pyx_L1_error)
9828  if (__pyx_t_2) {
9829 
9830  /* "View.MemoryView":413
9831  * cdef char *itemp
9832  * if have_slices:
9833  * return memview_slice(self, indices) # <<<<<<<<<<<<<<
9834  * else:
9835  * itemp = self.get_item_pointer(indices)
9836  */
9837  __Pyx_TraceLine(413,0,__PYX_ERR(1, 413, __pyx_L1_error))
9838  __Pyx_XDECREF(__pyx_r);
9839  __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 413, __pyx_L1_error)
9840  __Pyx_GOTREF(__pyx_t_3);
9841  __pyx_r = __pyx_t_3;
9842  __pyx_t_3 = 0;
9843  goto __pyx_L0;
9844 
9845  /* "View.MemoryView":412
9846  *
9847  * cdef char *itemp
9848  * if have_slices: # <<<<<<<<<<<<<<
9849  * return memview_slice(self, indices)
9850  * else:
9851  */
9852  }
9853 
9854  /* "View.MemoryView":415
9855  * return memview_slice(self, indices)
9856  * else:
9857  * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
9858  * return self.convert_item_to_object(itemp)
9859  *
9860  */
9861  __Pyx_TraceLine(415,0,__PYX_ERR(1, 415, __pyx_L1_error))
9862  /*else*/ {
9863  __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(1, 415, __pyx_L1_error)
9864  __pyx_v_itemp = __pyx_t_6;
9865 
9866  /* "View.MemoryView":416
9867  * else:
9868  * itemp = self.get_item_pointer(indices)
9869  * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
9870  *
9871  * def __setitem__(memoryview self, object index, object value):
9872  */
9873  __Pyx_TraceLine(416,0,__PYX_ERR(1, 416, __pyx_L1_error))
9874  __Pyx_XDECREF(__pyx_r);
9875  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error)
9876  __Pyx_GOTREF(__pyx_t_3);
9877  __pyx_r = __pyx_t_3;
9878  __pyx_t_3 = 0;
9879  goto __pyx_L0;
9880  }
9881 
9882  /* "View.MemoryView":405
9883  *
9884  *
9885  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
9886  * if index is Ellipsis:
9887  * return self
9888  */
9889 
9890  /* function exit code */
9891  __pyx_L1_error:;
9892  __Pyx_XDECREF(__pyx_t_3);
9893  __Pyx_XDECREF(__pyx_t_4);
9894  __Pyx_XDECREF(__pyx_t_5);
9895  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9896  __pyx_r = NULL;
9897  __pyx_L0:;
9898  __Pyx_XDECREF(__pyx_v_have_slices);
9899  __Pyx_XDECREF(__pyx_v_indices);
9900  __Pyx_XGIVEREF(__pyx_r);
9901  __Pyx_TraceReturn(__pyx_r, 0);
9902  __Pyx_RefNannyFinishContext();
9903  return __pyx_r;
9904 }
9905 
9906 /* "View.MemoryView":418
9907  * return self.convert_item_to_object(itemp)
9908  *
9909  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
9910  * if self.view.readonly:
9911  * raise TypeError("Cannot assign to read-only memoryview")
9912  */
9913 
9914 /* Python wrapper */
9915 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
9916 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
9917  int __pyx_r;
9918  __Pyx_RefNannyDeclarations
9919  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
9920  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
9921 
9922  /* function exit code */
9923  __Pyx_RefNannyFinishContext();
9924  return __pyx_r;
9925 }
9926 
9927 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
9928  PyObject *__pyx_v_have_slices = NULL;
9929  PyObject *__pyx_v_obj = NULL;
9930  int __pyx_r;
9931  __Pyx_TraceDeclarations
9932  __Pyx_RefNannyDeclarations
9933  int __pyx_t_1;
9934  PyObject *__pyx_t_2 = NULL;
9935  PyObject *__pyx_t_3 = NULL;
9936  PyObject *__pyx_t_4 = NULL;
9937  int __pyx_lineno = 0;
9938  const char *__pyx_filename = NULL;
9939  int __pyx_clineno = 0;
9940  __Pyx_RefNannySetupContext("__setitem__", 0);
9941  __Pyx_TraceCall("__setitem__", __pyx_f[1], 418, 0, __PYX_ERR(1, 418, __pyx_L1_error));
9942  __Pyx_INCREF(__pyx_v_index);
9943 
9944  /* "View.MemoryView":419
9945  *
9946  * def __setitem__(memoryview self, object index, object value):
9947  * if self.view.readonly: # <<<<<<<<<<<<<<
9948  * raise TypeError("Cannot assign to read-only memoryview")
9949  *
9950  */
9951  __Pyx_TraceLine(419,0,__PYX_ERR(1, 419, __pyx_L1_error))
9952  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
9953  if (unlikely(__pyx_t_1)) {
9954 
9955  /* "View.MemoryView":420
9956  * def __setitem__(memoryview self, object index, object value):
9957  * if self.view.readonly:
9958  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
9959  *
9960  * have_slices, index = _unellipsify(index, self.view.ndim)
9961  */
9962  __Pyx_TraceLine(420,0,__PYX_ERR(1, 420, __pyx_L1_error))
9963  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 420, __pyx_L1_error)
9964  __Pyx_GOTREF(__pyx_t_2);
9965  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
9966  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9967  __PYX_ERR(1, 420, __pyx_L1_error)
9968 
9969  /* "View.MemoryView":419
9970  *
9971  * def __setitem__(memoryview self, object index, object value):
9972  * if self.view.readonly: # <<<<<<<<<<<<<<
9973  * raise TypeError("Cannot assign to read-only memoryview")
9974  *
9975  */
9976  }
9977 
9978  /* "View.MemoryView":422
9979  * raise TypeError("Cannot assign to read-only memoryview")
9980  *
9981  * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
9982  *
9983  * if have_slices:
9984  */
9985  __Pyx_TraceLine(422,0,__PYX_ERR(1, 422, __pyx_L1_error))
9986  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 422, __pyx_L1_error)
9987  __Pyx_GOTREF(__pyx_t_2);
9988  if (likely(__pyx_t_2 != Py_None)) {
9989  PyObject* sequence = __pyx_t_2;
9990  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
9991  if (unlikely(size != 2)) {
9992  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
9993  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
9994  __PYX_ERR(1, 422, __pyx_L1_error)
9995  }
9996  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9997  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
9998  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
9999  __Pyx_INCREF(__pyx_t_3);
10000  __Pyx_INCREF(__pyx_t_4);
10001  #else
10002  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 422, __pyx_L1_error)
10003  __Pyx_GOTREF(__pyx_t_3);
10004  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 422, __pyx_L1_error)
10005  __Pyx_GOTREF(__pyx_t_4);
10006  #endif
10007  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10008  } else {
10009  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 422, __pyx_L1_error)
10010  }
10011  __pyx_v_have_slices = __pyx_t_3;
10012  __pyx_t_3 = 0;
10013  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
10014  __pyx_t_4 = 0;
10015 
10016  /* "View.MemoryView":424
10017  * have_slices, index = _unellipsify(index, self.view.ndim)
10018  *
10019  * if have_slices: # <<<<<<<<<<<<<<
10020  * obj = self.is_slice(value)
10021  * if obj:
10022  */
10023  __Pyx_TraceLine(424,0,__PYX_ERR(1, 424, __pyx_L1_error))
10024  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 424, __pyx_L1_error)
10025  if (__pyx_t_1) {
10026 
10027  /* "View.MemoryView":425
10028  *
10029  * if have_slices:
10030  * obj = self.is_slice(value) # <<<<<<<<<<<<<<
10031  * if obj:
10032  * self.setitem_slice_assignment(self[index], obj)
10033  */
10034  __Pyx_TraceLine(425,0,__PYX_ERR(1, 425, __pyx_L1_error))
10035  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error)
10036  __Pyx_GOTREF(__pyx_t_2);
10037  __pyx_v_obj = __pyx_t_2;
10038  __pyx_t_2 = 0;
10039 
10040  /* "View.MemoryView":426
10041  * if have_slices:
10042  * obj = self.is_slice(value)
10043  * if obj: # <<<<<<<<<<<<<<
10044  * self.setitem_slice_assignment(self[index], obj)
10045  * else:
10046  */
10047  __Pyx_TraceLine(426,0,__PYX_ERR(1, 426, __pyx_L1_error))
10048  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 426, __pyx_L1_error)
10049  if (__pyx_t_1) {
10050 
10051  /* "View.MemoryView":427
10052  * obj = self.is_slice(value)
10053  * if obj:
10054  * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
10055  * else:
10056  * self.setitem_slice_assign_scalar(self[index], value)
10057  */
10058  __Pyx_TraceLine(427,0,__PYX_ERR(1, 427, __pyx_L1_error))
10059  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 427, __pyx_L1_error)
10060  __Pyx_GOTREF(__pyx_t_2);
10061  __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 427, __pyx_L1_error)
10062  __Pyx_GOTREF(__pyx_t_4);
10063  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10064  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10065 
10066  /* "View.MemoryView":426
10067  * if have_slices:
10068  * obj = self.is_slice(value)
10069  * if obj: # <<<<<<<<<<<<<<
10070  * self.setitem_slice_assignment(self[index], obj)
10071  * else:
10072  */
10073  goto __pyx_L5;
10074  }
10075 
10076  /* "View.MemoryView":429
10077  * self.setitem_slice_assignment(self[index], obj)
10078  * else:
10079  * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
10080  * else:
10081  * self.setitem_indexed(index, value)
10082  */
10083  __Pyx_TraceLine(429,0,__PYX_ERR(1, 429, __pyx_L1_error))
10084  /*else*/ {
10085  __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 429, __pyx_L1_error)
10086  __Pyx_GOTREF(__pyx_t_4);
10087  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(1, 429, __pyx_L1_error)
10088  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 429, __pyx_L1_error)
10089  __Pyx_GOTREF(__pyx_t_2);
10090  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10091  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10092  }
10093  __pyx_L5:;
10094 
10095  /* "View.MemoryView":424
10096  * have_slices, index = _unellipsify(index, self.view.ndim)
10097  *
10098  * if have_slices: # <<<<<<<<<<<<<<
10099  * obj = self.is_slice(value)
10100  * if obj:
10101  */
10102  goto __pyx_L4;
10103  }
10104 
10105  /* "View.MemoryView":431
10106  * self.setitem_slice_assign_scalar(self[index], value)
10107  * else:
10108  * self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
10109  *
10110  * cdef is_slice(self, obj):
10111  */
10112  __Pyx_TraceLine(431,0,__PYX_ERR(1, 431, __pyx_L1_error))
10113  /*else*/ {
10114  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 431, __pyx_L1_error)
10115  __Pyx_GOTREF(__pyx_t_2);
10116  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10117  }
10118  __pyx_L4:;
10119 
10120  /* "View.MemoryView":418
10121  * return self.convert_item_to_object(itemp)
10122  *
10123  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
10124  * if self.view.readonly:
10125  * raise TypeError("Cannot assign to read-only memoryview")
10126  */
10127 
10128  /* function exit code */
10129  __pyx_r = 0;
10130  goto __pyx_L0;
10131  __pyx_L1_error:;
10132  __Pyx_XDECREF(__pyx_t_2);
10133  __Pyx_XDECREF(__pyx_t_3);
10134  __Pyx_XDECREF(__pyx_t_4);
10135  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10136  __pyx_r = -1;
10137  __pyx_L0:;
10138  __Pyx_XDECREF(__pyx_v_have_slices);
10139  __Pyx_XDECREF(__pyx_v_obj);
10140  __Pyx_XDECREF(__pyx_v_index);
10141  __Pyx_TraceReturn(Py_None, 0);
10142  __Pyx_RefNannyFinishContext();
10143  return __pyx_r;
10144 }
10145 
10146 /* "View.MemoryView":433
10147  * self.setitem_indexed(index, value)
10148  *
10149  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
10150  * if not isinstance(obj, memoryview):
10151  * try:
10152  */
10153 
10154 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
10155  PyObject *__pyx_r = NULL;
10156  __Pyx_TraceDeclarations
10157  __Pyx_RefNannyDeclarations
10158  int __pyx_t_1;
10159  int __pyx_t_2;
10160  PyObject *__pyx_t_3 = NULL;
10161  PyObject *__pyx_t_4 = NULL;
10162  PyObject *__pyx_t_5 = NULL;
10163  PyObject *__pyx_t_6 = NULL;
10164  PyObject *__pyx_t_7 = NULL;
10165  PyObject *__pyx_t_8 = NULL;
10166  int __pyx_t_9;
10167  int __pyx_lineno = 0;
10168  const char *__pyx_filename = NULL;
10169  int __pyx_clineno = 0;
10170  __Pyx_RefNannySetupContext("is_slice", 0);
10171  __Pyx_TraceCall("is_slice", __pyx_f[1], 433, 0, __PYX_ERR(1, 433, __pyx_L1_error));
10172  __Pyx_INCREF(__pyx_v_obj);
10173 
10174  /* "View.MemoryView":434
10175  *
10176  * cdef is_slice(self, obj):
10177  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
10178  * try:
10179  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10180  */
10181  __Pyx_TraceLine(434,0,__PYX_ERR(1, 434, __pyx_L1_error))
10182  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
10183  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
10184  if (__pyx_t_2) {
10185 
10186  /* "View.MemoryView":435
10187  * cdef is_slice(self, obj):
10188  * if not isinstance(obj, memoryview):
10189  * try: # <<<<<<<<<<<<<<
10190  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10191  * self.dtype_is_object)
10192  */
10193  __Pyx_TraceLine(435,0,__PYX_ERR(1, 435, __pyx_L1_error))
10194  {
10195  __Pyx_PyThreadState_declare
10196  __Pyx_PyThreadState_assign
10197  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
10198  __Pyx_XGOTREF(__pyx_t_3);
10199  __Pyx_XGOTREF(__pyx_t_4);
10200  __Pyx_XGOTREF(__pyx_t_5);
10201  /*try:*/ {
10202 
10203  /* "View.MemoryView":436
10204  * if not isinstance(obj, memoryview):
10205  * try:
10206  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
10207  * self.dtype_is_object)
10208  * except TypeError:
10209  */
10210  __Pyx_TraceLine(436,0,__PYX_ERR(1, 436, __pyx_L4_error))
10211  __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 436, __pyx_L4_error)
10212  __Pyx_GOTREF(__pyx_t_6);
10213 
10214  /* "View.MemoryView":437
10215  * try:
10216  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10217  * self.dtype_is_object) # <<<<<<<<<<<<<<
10218  * except TypeError:
10219  * return None
10220  */
10221  __Pyx_TraceLine(437,0,__PYX_ERR(1, 437, __pyx_L4_error))
10222  __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 437, __pyx_L4_error)
10223  __Pyx_GOTREF(__pyx_t_7);
10224 
10225  /* "View.MemoryView":436
10226  * if not isinstance(obj, memoryview):
10227  * try:
10228  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
10229  * self.dtype_is_object)
10230  * except TypeError:
10231  */
10232  __Pyx_TraceLine(436,0,__PYX_ERR(1, 436, __pyx_L4_error))
10233  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 436, __pyx_L4_error)
10234  __Pyx_GOTREF(__pyx_t_8);
10235  __Pyx_INCREF(__pyx_v_obj);
10236  __Pyx_GIVEREF(__pyx_v_obj);
10237  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
10238  __Pyx_GIVEREF(__pyx_t_6);
10239  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
10240  __Pyx_GIVEREF(__pyx_t_7);
10241  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
10242  __pyx_t_6 = 0;
10243  __pyx_t_7 = 0;
10244  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 436, __pyx_L4_error)
10245  __Pyx_GOTREF(__pyx_t_7);
10246  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10247  __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
10248  __pyx_t_7 = 0;
10249 
10250  /* "View.MemoryView":435
10251  * cdef is_slice(self, obj):
10252  * if not isinstance(obj, memoryview):
10253  * try: # <<<<<<<<<<<<<<
10254  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10255  * self.dtype_is_object)
10256  */
10257  }
10258  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10259  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10260  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10261  goto __pyx_L9_try_end;
10262  __pyx_L4_error:;
10263  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10264  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10265  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
10266 
10267  /* "View.MemoryView":438
10268  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10269  * self.dtype_is_object)
10270  * except TypeError: # <<<<<<<<<<<<<<
10271  * return None
10272  *
10273  */
10274  __Pyx_TraceLine(438,0,__PYX_ERR(1, 438, __pyx_L6_except_error))
10275  __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
10276  if (__pyx_t_9) {
10277  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
10278  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 438, __pyx_L6_except_error)
10279  __Pyx_GOTREF(__pyx_t_7);
10280  __Pyx_GOTREF(__pyx_t_8);
10281  __Pyx_GOTREF(__pyx_t_6);
10282 
10283  /* "View.MemoryView":439
10284  * self.dtype_is_object)
10285  * except TypeError:
10286  * return None # <<<<<<<<<<<<<<
10287  *
10288  * return obj
10289  */
10290  __Pyx_TraceLine(439,0,__PYX_ERR(1, 439, __pyx_L6_except_error))
10291  __Pyx_XDECREF(__pyx_r);
10292  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10293  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10294  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10295  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10296  goto __pyx_L7_except_return;
10297  }
10298  goto __pyx_L6_except_error;
10299  __pyx_L6_except_error:;
10300 
10301  /* "View.MemoryView":435
10302  * cdef is_slice(self, obj):
10303  * if not isinstance(obj, memoryview):
10304  * try: # <<<<<<<<<<<<<<
10305  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10306  * self.dtype_is_object)
10307  */
10308  __Pyx_XGIVEREF(__pyx_t_3);
10309  __Pyx_XGIVEREF(__pyx_t_4);
10310  __Pyx_XGIVEREF(__pyx_t_5);
10311  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
10312  goto __pyx_L1_error;
10313  __pyx_L7_except_return:;
10314  __Pyx_XGIVEREF(__pyx_t_3);
10315  __Pyx_XGIVEREF(__pyx_t_4);
10316  __Pyx_XGIVEREF(__pyx_t_5);
10317  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
10318  goto __pyx_L0;
10319  __pyx_L9_try_end:;
10320  }
10321 
10322  /* "View.MemoryView":434
10323  *
10324  * cdef is_slice(self, obj):
10325  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
10326  * try:
10327  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10328  */
10329  }
10330 
10331  /* "View.MemoryView":441
10332  * return None
10333  *
10334  * return obj # <<<<<<<<<<<<<<
10335  *
10336  * cdef setitem_slice_assignment(self, dst, src):
10337  */
10338  __Pyx_TraceLine(441,0,__PYX_ERR(1, 441, __pyx_L1_error))
10339  __Pyx_XDECREF(__pyx_r);
10340  __Pyx_INCREF(__pyx_v_obj);
10341  __pyx_r = __pyx_v_obj;
10342  goto __pyx_L0;
10343 
10344  /* "View.MemoryView":433
10345  * self.setitem_indexed(index, value)
10346  *
10347  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
10348  * if not isinstance(obj, memoryview):
10349  * try:
10350  */
10351 
10352  /* function exit code */
10353  __pyx_L1_error:;
10354  __Pyx_XDECREF(__pyx_t_6);
10355  __Pyx_XDECREF(__pyx_t_7);
10356  __Pyx_XDECREF(__pyx_t_8);
10357  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
10358  __pyx_r = 0;
10359  __pyx_L0:;
10360  __Pyx_XDECREF(__pyx_v_obj);
10361  __Pyx_XGIVEREF(__pyx_r);
10362  __Pyx_TraceReturn(__pyx_r, 0);
10363  __Pyx_RefNannyFinishContext();
10364  return __pyx_r;
10365 }
10366 
10367 /* "View.MemoryView":443
10368  * return obj
10369  *
10370  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
10371  * cdef __Pyx_memviewslice dst_slice
10372  * cdef __Pyx_memviewslice src_slice
10373  */
10374 
10375 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
10376  __Pyx_memviewslice __pyx_v_dst_slice;
10377  __Pyx_memviewslice __pyx_v_src_slice;
10378  PyObject *__pyx_r = NULL;
10379  __Pyx_TraceDeclarations
10380  __Pyx_RefNannyDeclarations
10381  __Pyx_memviewslice *__pyx_t_1;
10382  __Pyx_memviewslice *__pyx_t_2;
10383  PyObject *__pyx_t_3 = NULL;
10384  int __pyx_t_4;
10385  int __pyx_t_5;
10386  int __pyx_t_6;
10387  int __pyx_lineno = 0;
10388  const char *__pyx_filename = NULL;
10389  int __pyx_clineno = 0;
10390  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
10391  __Pyx_TraceCall("setitem_slice_assignment", __pyx_f[1], 443, 0, __PYX_ERR(1, 443, __pyx_L1_error));
10392 
10393  /* "View.MemoryView":447
10394  * cdef __Pyx_memviewslice src_slice
10395  *
10396  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
10397  * get_slice_from_memview(dst, &dst_slice)[0],
10398  * src.ndim, dst.ndim, self.dtype_is_object)
10399  */
10400  __Pyx_TraceLine(447,0,__PYX_ERR(1, 447, __pyx_L1_error))
10401  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 447, __pyx_L1_error)
10402  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 447, __pyx_L1_error)
10403 
10404  /* "View.MemoryView":448
10405  *
10406  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
10407  * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<<
10408  * src.ndim, dst.ndim, self.dtype_is_object)
10409  *
10410  */
10411  __Pyx_TraceLine(448,0,__PYX_ERR(1, 448, __pyx_L1_error))
10412  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error)
10413  __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error)
10414 
10415  /* "View.MemoryView":449
10416  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
10417  * get_slice_from_memview(dst, &dst_slice)[0],
10418  * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
10419  *
10420  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
10421  */
10422  __Pyx_TraceLine(449,0,__PYX_ERR(1, 449, __pyx_L1_error))
10423  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 449, __pyx_L1_error)
10424  __Pyx_GOTREF(__pyx_t_3);
10425  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 449, __pyx_L1_error)
10426  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10427  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 449, __pyx_L1_error)
10428  __Pyx_GOTREF(__pyx_t_3);
10429  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 449, __pyx_L1_error)
10430  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10431 
10432  /* "View.MemoryView":447
10433  * cdef __Pyx_memviewslice src_slice
10434  *
10435  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
10436  * get_slice_from_memview(dst, &dst_slice)[0],
10437  * src.ndim, dst.ndim, self.dtype_is_object)
10438  */
10439  __Pyx_TraceLine(447,0,__PYX_ERR(1, 447, __pyx_L1_error))
10440  __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 447, __pyx_L1_error)
10441 
10442  /* "View.MemoryView":443
10443  * return obj
10444  *
10445  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
10446  * cdef __Pyx_memviewslice dst_slice
10447  * cdef __Pyx_memviewslice src_slice
10448  */
10449 
10450  /* function exit code */
10451  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10452  goto __pyx_L0;
10453  __pyx_L1_error:;
10454  __Pyx_XDECREF(__pyx_t_3);
10455  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
10456  __pyx_r = 0;
10457  __pyx_L0:;
10458  __Pyx_XGIVEREF(__pyx_r);
10459  __Pyx_TraceReturn(__pyx_r, 0);
10460  __Pyx_RefNannyFinishContext();
10461  return __pyx_r;
10462 }
10463 
10464 /* "View.MemoryView":451
10465  * src.ndim, dst.ndim, self.dtype_is_object)
10466  *
10467  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
10468  * cdef int array[128]
10469  * cdef void *tmp = NULL
10470  */
10471 
10472 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
10473  int __pyx_v_array[0x80];
10474  void *__pyx_v_tmp;
10475  void *__pyx_v_item;
10476  __Pyx_memviewslice *__pyx_v_dst_slice;
10477  __Pyx_memviewslice __pyx_v_tmp_slice;
10478  PyObject *__pyx_r = NULL;
10479  __Pyx_TraceDeclarations
10480  __Pyx_RefNannyDeclarations
10481  __Pyx_memviewslice *__pyx_t_1;
10482  int __pyx_t_2;
10483  PyObject *__pyx_t_3 = NULL;
10484  int __pyx_t_4;
10485  int __pyx_t_5;
10486  char const *__pyx_t_6;
10487  PyObject *__pyx_t_7 = NULL;
10488  PyObject *__pyx_t_8 = NULL;
10489  PyObject *__pyx_t_9 = NULL;
10490  PyObject *__pyx_t_10 = NULL;
10491  PyObject *__pyx_t_11 = NULL;
10492  PyObject *__pyx_t_12 = NULL;
10493  int __pyx_lineno = 0;
10494  const char *__pyx_filename = NULL;
10495  int __pyx_clineno = 0;
10496  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
10497  __Pyx_TraceCall("setitem_slice_assign_scalar", __pyx_f[1], 451, 0, __PYX_ERR(1, 451, __pyx_L1_error));
10498 
10499  /* "View.MemoryView":453
10500  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
10501  * cdef int array[128]
10502  * cdef void *tmp = NULL # <<<<<<<<<<<<<<
10503  * cdef void *item
10504  *
10505  */
10506  __Pyx_TraceLine(453,0,__PYX_ERR(1, 453, __pyx_L1_error))
10507  __pyx_v_tmp = NULL;
10508 
10509  /* "View.MemoryView":458
10510  * cdef __Pyx_memviewslice *dst_slice
10511  * cdef __Pyx_memviewslice tmp_slice
10512  * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
10513  *
10514  * if <size_t>self.view.itemsize > sizeof(array):
10515  */
10516  __Pyx_TraceLine(458,0,__PYX_ERR(1, 458, __pyx_L1_error))
10517  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 458, __pyx_L1_error)
10518  __pyx_v_dst_slice = __pyx_t_1;
10519 
10520  /* "View.MemoryView":460
10521  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
10522  *
10523  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
10524  * tmp = PyMem_Malloc(self.view.itemsize)
10525  * if tmp == NULL:
10526  */
10527  __Pyx_TraceLine(460,0,__PYX_ERR(1, 460, __pyx_L1_error))
10528  __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
10529  if (__pyx_t_2) {
10530 
10531  /* "View.MemoryView":461
10532  *
10533  * if <size_t>self.view.itemsize > sizeof(array):
10534  * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
10535  * if tmp == NULL:
10536  * raise MemoryError
10537  */
10538  __Pyx_TraceLine(461,0,__PYX_ERR(1, 461, __pyx_L1_error))
10539  __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
10540 
10541  /* "View.MemoryView":462
10542  * if <size_t>self.view.itemsize > sizeof(array):
10543  * tmp = PyMem_Malloc(self.view.itemsize)
10544  * if tmp == NULL: # <<<<<<<<<<<<<<
10545  * raise MemoryError
10546  * item = tmp
10547  */
10548  __Pyx_TraceLine(462,0,__PYX_ERR(1, 462, __pyx_L1_error))
10549  __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
10550  if (unlikely(__pyx_t_2)) {
10551 
10552  /* "View.MemoryView":463
10553  * tmp = PyMem_Malloc(self.view.itemsize)
10554  * if tmp == NULL:
10555  * raise MemoryError # <<<<<<<<<<<<<<
10556  * item = tmp
10557  * else:
10558  */
10559  __Pyx_TraceLine(463,0,__PYX_ERR(1, 463, __pyx_L1_error))
10560  PyErr_NoMemory(); __PYX_ERR(1, 463, __pyx_L1_error)
10561 
10562  /* "View.MemoryView":462
10563  * if <size_t>self.view.itemsize > sizeof(array):
10564  * tmp = PyMem_Malloc(self.view.itemsize)
10565  * if tmp == NULL: # <<<<<<<<<<<<<<
10566  * raise MemoryError
10567  * item = tmp
10568  */
10569  }
10570 
10571  /* "View.MemoryView":464
10572  * if tmp == NULL:
10573  * raise MemoryError
10574  * item = tmp # <<<<<<<<<<<<<<
10575  * else:
10576  * item = <void *> array
10577  */
10578  __Pyx_TraceLine(464,0,__PYX_ERR(1, 464, __pyx_L1_error))
10579  __pyx_v_item = __pyx_v_tmp;
10580 
10581  /* "View.MemoryView":460
10582  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
10583  *
10584  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
10585  * tmp = PyMem_Malloc(self.view.itemsize)
10586  * if tmp == NULL:
10587  */
10588  goto __pyx_L3;
10589  }
10590 
10591  /* "View.MemoryView":466
10592  * item = tmp
10593  * else:
10594  * item = <void *> array # <<<<<<<<<<<<<<
10595  *
10596  * try:
10597  */
10598  __Pyx_TraceLine(466,0,__PYX_ERR(1, 466, __pyx_L1_error))
10599  /*else*/ {
10600  __pyx_v_item = ((void *)__pyx_v_array);
10601  }
10602  __pyx_L3:;
10603 
10604  /* "View.MemoryView":468
10605  * item = <void *> array
10606  *
10607  * try: # <<<<<<<<<<<<<<
10608  * if self.dtype_is_object:
10609  * (<PyObject **> item)[0] = <PyObject *> value
10610  */
10611  __Pyx_TraceLine(468,0,__PYX_ERR(1, 468, __pyx_L1_error))
10612  /*try:*/ {
10613 
10614  /* "View.MemoryView":469
10615  *
10616  * try:
10617  * if self.dtype_is_object: # <<<<<<<<<<<<<<
10618  * (<PyObject **> item)[0] = <PyObject *> value
10619  * else:
10620  */
10621  __Pyx_TraceLine(469,0,__PYX_ERR(1, 469, __pyx_L6_error))
10622  __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
10623  if (__pyx_t_2) {
10624 
10625  /* "View.MemoryView":470
10626  * try:
10627  * if self.dtype_is_object:
10628  * (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
10629  * else:
10630  * self.assign_item_from_object(<char *> item, value)
10631  */
10632  __Pyx_TraceLine(470,0,__PYX_ERR(1, 470, __pyx_L6_error))
10633  (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
10634 
10635  /* "View.MemoryView":469
10636  *
10637  * try:
10638  * if self.dtype_is_object: # <<<<<<<<<<<<<<
10639  * (<PyObject **> item)[0] = <PyObject *> value
10640  * else:
10641  */
10642  goto __pyx_L8;
10643  }
10644 
10645  /* "View.MemoryView":472
10646  * (<PyObject **> item)[0] = <PyObject *> value
10647  * else:
10648  * self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
10649  *
10650  *
10651  */
10652  __Pyx_TraceLine(472,0,__PYX_ERR(1, 472, __pyx_L6_error))
10653  /*else*/ {
10654  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 472, __pyx_L6_error)
10655  __Pyx_GOTREF(__pyx_t_3);
10656  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10657  }
10658  __pyx_L8:;
10659 
10660  /* "View.MemoryView":476
10661  *
10662  *
10663  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
10664  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
10665  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
10666  */
10667  __Pyx_TraceLine(476,0,__PYX_ERR(1, 476, __pyx_L6_error))
10668  __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
10669  if (__pyx_t_2) {
10670 
10671  /* "View.MemoryView":477
10672  *
10673  * if self.view.suboffsets != NULL:
10674  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
10675  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
10676  * item, self.dtype_is_object)
10677  */
10678  __Pyx_TraceLine(477,0,__PYX_ERR(1, 477, __pyx_L6_error))
10679  __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 477, __pyx_L6_error)
10680  __Pyx_GOTREF(__pyx_t_3);
10681  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10682 
10683  /* "View.MemoryView":476
10684  *
10685  *
10686  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
10687  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
10688  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
10689  */
10690  }
10691 
10692  /* "View.MemoryView":478
10693  * if self.view.suboffsets != NULL:
10694  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
10695  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
10696  * item, self.dtype_is_object)
10697  * finally:
10698  */
10699  __Pyx_TraceLine(478,0,__PYX_ERR(1, 478, __pyx_L6_error))
10700  __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
10701  }
10702 
10703  /* "View.MemoryView":481
10704  * item, self.dtype_is_object)
10705  * finally:
10706  * PyMem_Free(tmp) # <<<<<<<<<<<<<<
10707  *
10708  * cdef setitem_indexed(self, index, value):
10709  */
10710  __Pyx_TraceLine(481,0,__PYX_ERR(1, 481, __pyx_L6_error))
10711  /*finally:*/ {
10712  /*normal exit:*/{
10713  PyMem_Free(__pyx_v_tmp);
10714  goto __pyx_L7;
10715  }
10716  __pyx_L6_error:;
10717  /*exception exit:*/{
10718  __Pyx_PyThreadState_declare
10719  __Pyx_PyThreadState_assign
10720  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
10721  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10722  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
10723  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
10724  __Pyx_XGOTREF(__pyx_t_7);
10725  __Pyx_XGOTREF(__pyx_t_8);
10726  __Pyx_XGOTREF(__pyx_t_9);
10727  __Pyx_XGOTREF(__pyx_t_10);
10728  __Pyx_XGOTREF(__pyx_t_11);
10729  __Pyx_XGOTREF(__pyx_t_12);
10730  __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
10731  {
10732  PyMem_Free(__pyx_v_tmp);
10733  }
10734  if (PY_MAJOR_VERSION >= 3) {
10735  __Pyx_XGIVEREF(__pyx_t_10);
10736  __Pyx_XGIVEREF(__pyx_t_11);
10737  __Pyx_XGIVEREF(__pyx_t_12);
10738  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
10739  }
10740  __Pyx_XGIVEREF(__pyx_t_7);
10741  __Pyx_XGIVEREF(__pyx_t_8);
10742  __Pyx_XGIVEREF(__pyx_t_9);
10743  __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
10744  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
10745  __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
10746  goto __pyx_L1_error;
10747  }
10748  __pyx_L7:;
10749  }
10750 
10751  /* "View.MemoryView":451
10752  * src.ndim, dst.ndim, self.dtype_is_object)
10753  *
10754  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
10755  * cdef int array[128]
10756  * cdef void *tmp = NULL
10757  */
10758 
10759  /* function exit code */
10760  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10761  goto __pyx_L0;
10762  __pyx_L1_error:;
10763  __Pyx_XDECREF(__pyx_t_3);
10764  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10765  __pyx_r = 0;
10766  __pyx_L0:;
10767  __Pyx_XGIVEREF(__pyx_r);
10768  __Pyx_TraceReturn(__pyx_r, 0);
10769  __Pyx_RefNannyFinishContext();
10770  return __pyx_r;
10771 }
10772 
10773 /* "View.MemoryView":483
10774  * PyMem_Free(tmp)
10775  *
10776  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
10777  * cdef char *itemp = self.get_item_pointer(index)
10778  * self.assign_item_from_object(itemp, value)
10779  */
10780 
10781 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
10782  char *__pyx_v_itemp;
10783  PyObject *__pyx_r = NULL;
10784  __Pyx_TraceDeclarations
10785  __Pyx_RefNannyDeclarations
10786  char *__pyx_t_1;
10787  PyObject *__pyx_t_2 = NULL;
10788  int __pyx_lineno = 0;
10789  const char *__pyx_filename = NULL;
10790  int __pyx_clineno = 0;
10791  __Pyx_RefNannySetupContext("setitem_indexed", 0);
10792  __Pyx_TraceCall("setitem_indexed", __pyx_f[1], 483, 0, __PYX_ERR(1, 483, __pyx_L1_error));
10793 
10794  /* "View.MemoryView":484
10795  *
10796  * cdef setitem_indexed(self, index, value):
10797  * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
10798  * self.assign_item_from_object(itemp, value)
10799  *
10800  */
10801  __Pyx_TraceLine(484,0,__PYX_ERR(1, 484, __pyx_L1_error))
10802  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 484, __pyx_L1_error)
10803  __pyx_v_itemp = __pyx_t_1;
10804 
10805  /* "View.MemoryView":485
10806  * cdef setitem_indexed(self, index, value):
10807  * cdef char *itemp = self.get_item_pointer(index)
10808  * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
10809  *
10810  * cdef convert_item_to_object(self, char *itemp):
10811  */
10812  __Pyx_TraceLine(485,0,__PYX_ERR(1, 485, __pyx_L1_error))
10813  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 485, __pyx_L1_error)
10814  __Pyx_GOTREF(__pyx_t_2);
10815  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10816 
10817  /* "View.MemoryView":483
10818  * PyMem_Free(tmp)
10819  *
10820  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
10821  * cdef char *itemp = self.get_item_pointer(index)
10822  * self.assign_item_from_object(itemp, value)
10823  */
10824 
10825  /* function exit code */
10826  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10827  goto __pyx_L0;
10828  __pyx_L1_error:;
10829  __Pyx_XDECREF(__pyx_t_2);
10830  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
10831  __pyx_r = 0;
10832  __pyx_L0:;
10833  __Pyx_XGIVEREF(__pyx_r);
10834  __Pyx_TraceReturn(__pyx_r, 0);
10835  __Pyx_RefNannyFinishContext();
10836  return __pyx_r;
10837 }
10838 
10839 /* "View.MemoryView":487
10840  * self.assign_item_from_object(itemp, value)
10841  *
10842  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
10843  * """Only used if instantiated manually by the user, or if Cython doesn't
10844  * know how to convert the type"""
10845  */
10846 
10847 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
10848  PyObject *__pyx_v_struct = NULL;
10849  PyObject *__pyx_v_bytesitem = 0;
10850  PyObject *__pyx_v_result = NULL;
10851  PyObject *__pyx_r = NULL;
10852  __Pyx_TraceDeclarations
10853  __Pyx_RefNannyDeclarations
10854  PyObject *__pyx_t_1 = NULL;
10855  PyObject *__pyx_t_2 = NULL;
10856  PyObject *__pyx_t_3 = NULL;
10857  PyObject *__pyx_t_4 = NULL;
10858  PyObject *__pyx_t_5 = NULL;
10859  PyObject *__pyx_t_6 = NULL;
10860  PyObject *__pyx_t_7 = NULL;
10861  int __pyx_t_8;
10862  PyObject *__pyx_t_9 = NULL;
10863  size_t __pyx_t_10;
10864  int __pyx_t_11;
10865  int __pyx_lineno = 0;
10866  const char *__pyx_filename = NULL;
10867  int __pyx_clineno = 0;
10868  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
10869  __Pyx_TraceCall("convert_item_to_object", __pyx_f[1], 487, 0, __PYX_ERR(1, 487, __pyx_L1_error));
10870 
10871  /* "View.MemoryView":490
10872  * """Only used if instantiated manually by the user, or if Cython doesn't
10873  * know how to convert the type"""
10874  * import struct # <<<<<<<<<<<<<<
10875  * cdef bytes bytesitem
10876  *
10877  */
10878  __Pyx_TraceLine(490,0,__PYX_ERR(1, 490, __pyx_L1_error))
10879  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 490, __pyx_L1_error)
10880  __Pyx_GOTREF(__pyx_t_1);
10881  __pyx_v_struct = __pyx_t_1;
10882  __pyx_t_1 = 0;
10883 
10884  /* "View.MemoryView":493
10885  * cdef bytes bytesitem
10886  *
10887  * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
10888  * try:
10889  * result = struct.unpack(self.view.format, bytesitem)
10890  */
10891  __Pyx_TraceLine(493,0,__PYX_ERR(1, 493, __pyx_L1_error))
10892  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L1_error)
10893  __Pyx_GOTREF(__pyx_t_1);
10894  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
10895  __pyx_t_1 = 0;
10896 
10897  /* "View.MemoryView":494
10898  *
10899  * bytesitem = itemp[:self.view.itemsize]
10900  * try: # <<<<<<<<<<<<<<
10901  * result = struct.unpack(self.view.format, bytesitem)
10902  * except struct.error:
10903  */
10904  __Pyx_TraceLine(494,0,__PYX_ERR(1, 494, __pyx_L1_error))
10905  {
10906  __Pyx_PyThreadState_declare
10907  __Pyx_PyThreadState_assign
10908  __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
10909  __Pyx_XGOTREF(__pyx_t_2);
10910  __Pyx_XGOTREF(__pyx_t_3);
10911  __Pyx_XGOTREF(__pyx_t_4);
10912  /*try:*/ {
10913 
10914  /* "View.MemoryView":495
10915  * bytesitem = itemp[:self.view.itemsize]
10916  * try:
10917  * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
10918  * except struct.error:
10919  * raise ValueError("Unable to convert item to object")
10920  */
10921  __Pyx_TraceLine(495,0,__PYX_ERR(1, 495, __pyx_L3_error))
10922  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 495, __pyx_L3_error)
10923  __Pyx_GOTREF(__pyx_t_5);
10924  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 495, __pyx_L3_error)
10925  __Pyx_GOTREF(__pyx_t_6);
10926  __pyx_t_7 = NULL;
10927  __pyx_t_8 = 0;
10928  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
10929  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
10930  if (likely(__pyx_t_7)) {
10931  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
10932  __Pyx_INCREF(__pyx_t_7);
10933  __Pyx_INCREF(function);
10934  __Pyx_DECREF_SET(__pyx_t_5, function);
10935  __pyx_t_8 = 1;
10936  }
10937  }
10938  #if CYTHON_FAST_PYCALL
10939  if (PyFunction_Check(__pyx_t_5)) {
10940  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
10941  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
10942  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10943  __Pyx_GOTREF(__pyx_t_1);
10944  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10945  } else
10946  #endif
10947  #if CYTHON_FAST_PYCCALL
10948  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
10949  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
10950  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
10951  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10952  __Pyx_GOTREF(__pyx_t_1);
10953  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10954  } else
10955  #endif
10956  {
10957  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 495, __pyx_L3_error)
10958  __Pyx_GOTREF(__pyx_t_9);
10959  if (__pyx_t_7) {
10960  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
10961  }
10962  __Pyx_GIVEREF(__pyx_t_6);
10963  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
10964  __Pyx_INCREF(__pyx_v_bytesitem);
10965  __Pyx_GIVEREF(__pyx_v_bytesitem);
10966  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
10967  __pyx_t_6 = 0;
10968  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
10969  __Pyx_GOTREF(__pyx_t_1);
10970  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10971  }
10972  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10973  __pyx_v_result = __pyx_t_1;
10974  __pyx_t_1 = 0;
10975 
10976  /* "View.MemoryView":494
10977  *
10978  * bytesitem = itemp[:self.view.itemsize]
10979  * try: # <<<<<<<<<<<<<<
10980  * result = struct.unpack(self.view.format, bytesitem)
10981  * except struct.error:
10982  */
10983  }
10984 
10985  /* "View.MemoryView":499
10986  * raise ValueError("Unable to convert item to object")
10987  * else:
10988  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
10989  * return result[0]
10990  * return result
10991  */
10992  __Pyx_TraceLine(499,0,__PYX_ERR(1, 499, __pyx_L5_except_error))
10993  /*else:*/ {
10994  __pyx_t_10 = strlen(__pyx_v_self->view.format);
10995  __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
10996  if (__pyx_t_11) {
10997 
10998  /* "View.MemoryView":500
10999  * else:
11000  * if len(self.view.format) == 1:
11001  * return result[0] # <<<<<<<<<<<<<<
11002  * return result
11003  *
11004  */
11005  __Pyx_TraceLine(500,0,__PYX_ERR(1, 500, __pyx_L5_except_error))
11006  __Pyx_XDECREF(__pyx_r);
11007  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L5_except_error)
11008  __Pyx_GOTREF(__pyx_t_1);
11009  __pyx_r = __pyx_t_1;
11010  __pyx_t_1 = 0;
11011  goto __pyx_L6_except_return;
11012 
11013  /* "View.MemoryView":499
11014  * raise ValueError("Unable to convert item to object")
11015  * else:
11016  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
11017  * return result[0]
11018  * return result
11019  */
11020  }
11021 
11022  /* "View.MemoryView":501
11023  * if len(self.view.format) == 1:
11024  * return result[0]
11025  * return result # <<<<<<<<<<<<<<
11026  *
11027  * cdef assign_item_from_object(self, char *itemp, object value):
11028  */
11029  __Pyx_TraceLine(501,0,__PYX_ERR(1, 501, __pyx_L5_except_error))
11030  __Pyx_XDECREF(__pyx_r);
11031  __Pyx_INCREF(__pyx_v_result);
11032  __pyx_r = __pyx_v_result;
11033  goto __pyx_L6_except_return;
11034  }
11035  __pyx_L3_error:;
11036  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11037  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11038  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11039  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11040  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
11041 
11042  /* "View.MemoryView":496
11043  * try:
11044  * result = struct.unpack(self.view.format, bytesitem)
11045  * except struct.error: # <<<<<<<<<<<<<<
11046  * raise ValueError("Unable to convert item to object")
11047  * else:
11048  */
11049  __Pyx_TraceLine(496,0,__PYX_ERR(1, 496, __pyx_L5_except_error))
11050  __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
11051  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 496, __pyx_L5_except_error)
11052  __Pyx_GOTREF(__pyx_t_6);
11053  __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
11054  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11055  __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
11056  __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
11057  if (__pyx_t_8) {
11058  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
11059  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 496, __pyx_L5_except_error)
11060  __Pyx_GOTREF(__pyx_t_9);
11061  __Pyx_GOTREF(__pyx_t_5);
11062  __Pyx_GOTREF(__pyx_t_1);
11063 
11064  /* "View.MemoryView":497
11065  * result = struct.unpack(self.view.format, bytesitem)
11066  * except struct.error:
11067  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
11068  * else:
11069  * if len(self.view.format) == 1:
11070  */
11071  __Pyx_TraceLine(497,0,__PYX_ERR(1, 497, __pyx_L5_except_error))
11072  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L5_except_error)
11073  __Pyx_GOTREF(__pyx_t_6);
11074  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
11075  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11076  __PYX_ERR(1, 497, __pyx_L5_except_error)
11077  }
11078  goto __pyx_L5_except_error;
11079  __pyx_L5_except_error:;
11080 
11081  /* "View.MemoryView":494
11082  *
11083  * bytesitem = itemp[:self.view.itemsize]
11084  * try: # <<<<<<<<<<<<<<
11085  * result = struct.unpack(self.view.format, bytesitem)
11086  * except struct.error:
11087  */
11088  __Pyx_XGIVEREF(__pyx_t_2);
11089  __Pyx_XGIVEREF(__pyx_t_3);
11090  __Pyx_XGIVEREF(__pyx_t_4);
11091  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
11092  goto __pyx_L1_error;
11093  __pyx_L6_except_return:;
11094  __Pyx_XGIVEREF(__pyx_t_2);
11095  __Pyx_XGIVEREF(__pyx_t_3);
11096  __Pyx_XGIVEREF(__pyx_t_4);
11097  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
11098  goto __pyx_L0;
11099  }
11100 
11101  /* "View.MemoryView":487
11102  * self.assign_item_from_object(itemp, value)
11103  *
11104  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
11105  * """Only used if instantiated manually by the user, or if Cython doesn't
11106  * know how to convert the type"""
11107  */
11108 
11109  /* function exit code */
11110  __pyx_L1_error:;
11111  __Pyx_XDECREF(__pyx_t_1);
11112  __Pyx_XDECREF(__pyx_t_5);
11113  __Pyx_XDECREF(__pyx_t_6);
11114  __Pyx_XDECREF(__pyx_t_7);
11115  __Pyx_XDECREF(__pyx_t_9);
11116  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
11117  __pyx_r = 0;
11118  __pyx_L0:;
11119  __Pyx_XDECREF(__pyx_v_struct);
11120  __Pyx_XDECREF(__pyx_v_bytesitem);
11121  __Pyx_XDECREF(__pyx_v_result);
11122  __Pyx_XGIVEREF(__pyx_r);
11123  __Pyx_TraceReturn(__pyx_r, 0);
11124  __Pyx_RefNannyFinishContext();
11125  return __pyx_r;
11126 }
11127 
11128 /* "View.MemoryView":503
11129  * return result
11130  *
11131  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
11132  * """Only used if instantiated manually by the user, or if Cython doesn't
11133  * know how to convert the type"""
11134  */
11135 
11136 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
11137  PyObject *__pyx_v_struct = NULL;
11138  char __pyx_v_c;
11139  PyObject *__pyx_v_bytesvalue = 0;
11140  Py_ssize_t __pyx_v_i;
11141  PyObject *__pyx_r = NULL;
11142  __Pyx_TraceDeclarations
11143  __Pyx_RefNannyDeclarations
11144  PyObject *__pyx_t_1 = NULL;
11145  int __pyx_t_2;
11146  int __pyx_t_3;
11147  PyObject *__pyx_t_4 = NULL;
11148  PyObject *__pyx_t_5 = NULL;
11149  PyObject *__pyx_t_6 = NULL;
11150  int __pyx_t_7;
11151  PyObject *__pyx_t_8 = NULL;
11152  Py_ssize_t __pyx_t_9;
11153  PyObject *__pyx_t_10 = NULL;
11154  char *__pyx_t_11;
11155  char *__pyx_t_12;
11156  char *__pyx_t_13;
11157  char *__pyx_t_14;
11158  int __pyx_lineno = 0;
11159  const char *__pyx_filename = NULL;
11160  int __pyx_clineno = 0;
11161  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
11162  __Pyx_TraceCall("assign_item_from_object", __pyx_f[1], 503, 0, __PYX_ERR(1, 503, __pyx_L1_error));
11163 
11164  /* "View.MemoryView":506
11165  * """Only used if instantiated manually by the user, or if Cython doesn't
11166  * know how to convert the type"""
11167  * import struct # <<<<<<<<<<<<<<
11168  * cdef char c
11169  * cdef bytes bytesvalue
11170  */
11171  __Pyx_TraceLine(506,0,__PYX_ERR(1, 506, __pyx_L1_error))
11172  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error)
11173  __Pyx_GOTREF(__pyx_t_1);
11174  __pyx_v_struct = __pyx_t_1;
11175  __pyx_t_1 = 0;
11176 
11177  /* "View.MemoryView":511
11178  * cdef Py_ssize_t i
11179  *
11180  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
11181  * bytesvalue = struct.pack(self.view.format, *value)
11182  * else:
11183  */
11184  __Pyx_TraceLine(511,0,__PYX_ERR(1, 511, __pyx_L1_error))
11185  __pyx_t_2 = PyTuple_Check(__pyx_v_value);
11186  __pyx_t_3 = (__pyx_t_2 != 0);
11187  if (__pyx_t_3) {
11188 
11189  /* "View.MemoryView":512
11190  *
11191  * if isinstance(value, tuple):
11192  * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
11193  * else:
11194  * bytesvalue = struct.pack(self.view.format, value)
11195  */
11196  __Pyx_TraceLine(512,0,__PYX_ERR(1, 512, __pyx_L1_error))
11197  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error)
11198  __Pyx_GOTREF(__pyx_t_1);
11199  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
11200  __Pyx_GOTREF(__pyx_t_4);
11201  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 512, __pyx_L1_error)
11202  __Pyx_GOTREF(__pyx_t_5);
11203  __Pyx_GIVEREF(__pyx_t_4);
11204  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
11205  __pyx_t_4 = 0;
11206  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
11207  __Pyx_GOTREF(__pyx_t_4);
11208  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 512, __pyx_L1_error)
11209  __Pyx_GOTREF(__pyx_t_6);
11210  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11211  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11212  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
11213  __Pyx_GOTREF(__pyx_t_4);
11214  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11215  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11216  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 512, __pyx_L1_error)
11217  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
11218  __pyx_t_4 = 0;
11219 
11220  /* "View.MemoryView":511
11221  * cdef Py_ssize_t i
11222  *
11223  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
11224  * bytesvalue = struct.pack(self.view.format, *value)
11225  * else:
11226  */
11227  goto __pyx_L3;
11228  }
11229 
11230  /* "View.MemoryView":514
11231  * bytesvalue = struct.pack(self.view.format, *value)
11232  * else:
11233  * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
11234  *
11235  * for i, c in enumerate(bytesvalue):
11236  */
11237  __Pyx_TraceLine(514,0,__PYX_ERR(1, 514, __pyx_L1_error))
11238  /*else*/ {
11239  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 514, __pyx_L1_error)
11240  __Pyx_GOTREF(__pyx_t_6);
11241  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
11242  __Pyx_GOTREF(__pyx_t_1);
11243  __pyx_t_5 = NULL;
11244  __pyx_t_7 = 0;
11245  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
11246  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
11247  if (likely(__pyx_t_5)) {
11248  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
11249  __Pyx_INCREF(__pyx_t_5);
11250  __Pyx_INCREF(function);
11251  __Pyx_DECREF_SET(__pyx_t_6, function);
11252  __pyx_t_7 = 1;
11253  }
11254  }
11255  #if CYTHON_FAST_PYCALL
11256  if (PyFunction_Check(__pyx_t_6)) {
11257  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
11258  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
11259  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11260  __Pyx_GOTREF(__pyx_t_4);
11261  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11262  } else
11263  #endif
11264  #if CYTHON_FAST_PYCCALL
11265  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
11266  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
11267  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
11268  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11269  __Pyx_GOTREF(__pyx_t_4);
11270  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11271  } else
11272  #endif
11273  {
11274  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 514, __pyx_L1_error)
11275  __Pyx_GOTREF(__pyx_t_8);
11276  if (__pyx_t_5) {
11277  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
11278  }
11279  __Pyx_GIVEREF(__pyx_t_1);
11280  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
11281  __Pyx_INCREF(__pyx_v_value);
11282  __Pyx_GIVEREF(__pyx_v_value);
11283  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
11284  __pyx_t_1 = 0;
11285  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
11286  __Pyx_GOTREF(__pyx_t_4);
11287  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11288  }
11289  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11290  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 514, __pyx_L1_error)
11291  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
11292  __pyx_t_4 = 0;
11293  }
11294  __pyx_L3:;
11295 
11296  /* "View.MemoryView":516
11297  * bytesvalue = struct.pack(self.view.format, value)
11298  *
11299  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
11300  * itemp[i] = c
11301  *
11302  */
11303  __Pyx_TraceLine(516,0,__PYX_ERR(1, 516, __pyx_L1_error))
11304  __pyx_t_9 = 0;
11305  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
11306  PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
11307  __PYX_ERR(1, 516, __pyx_L1_error)
11308  }
11309  __Pyx_INCREF(__pyx_v_bytesvalue);
11310  __pyx_t_10 = __pyx_v_bytesvalue;
11311  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
11312  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
11313  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
11314  __pyx_t_11 = __pyx_t_14;
11315  __pyx_v_c = (__pyx_t_11[0]);
11316 
11317  /* "View.MemoryView":517
11318  *
11319  * for i, c in enumerate(bytesvalue):
11320  * itemp[i] = c # <<<<<<<<<<<<<<
11321  *
11322  * @cname('getbuffer')
11323  */
11324  __Pyx_TraceLine(517,0,__PYX_ERR(1, 517, __pyx_L1_error))
11325  __pyx_v_i = __pyx_t_9;
11326 
11327  /* "View.MemoryView":516
11328  * bytesvalue = struct.pack(self.view.format, value)
11329  *
11330  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
11331  * itemp[i] = c
11332  *
11333  */
11334  __Pyx_TraceLine(516,0,__PYX_ERR(1, 516, __pyx_L1_error))
11335  __pyx_t_9 = (__pyx_t_9 + 1);
11336 
11337  /* "View.MemoryView":517
11338  *
11339  * for i, c in enumerate(bytesvalue):
11340  * itemp[i] = c # <<<<<<<<<<<<<<
11341  *
11342  * @cname('getbuffer')
11343  */
11344  __Pyx_TraceLine(517,0,__PYX_ERR(1, 517, __pyx_L1_error))
11345  (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
11346  }
11347  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11348 
11349  /* "View.MemoryView":503
11350  * return result
11351  *
11352  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
11353  * """Only used if instantiated manually by the user, or if Cython doesn't
11354  * know how to convert the type"""
11355  */
11356 
11357  /* function exit code */
11358  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11359  goto __pyx_L0;
11360  __pyx_L1_error:;
11361  __Pyx_XDECREF(__pyx_t_1);
11362  __Pyx_XDECREF(__pyx_t_4);
11363  __Pyx_XDECREF(__pyx_t_5);
11364  __Pyx_XDECREF(__pyx_t_6);
11365  __Pyx_XDECREF(__pyx_t_8);
11366  __Pyx_XDECREF(__pyx_t_10);
11367  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
11368  __pyx_r = 0;
11369  __pyx_L0:;
11370  __Pyx_XDECREF(__pyx_v_struct);
11371  __Pyx_XDECREF(__pyx_v_bytesvalue);
11372  __Pyx_XGIVEREF(__pyx_r);
11373  __Pyx_TraceReturn(__pyx_r, 0);
11374  __Pyx_RefNannyFinishContext();
11375  return __pyx_r;
11376 }
11377 
11378 /* "View.MemoryView":520
11379  *
11380  * @cname('getbuffer')
11381  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
11382  * if flags & PyBUF_WRITABLE and self.view.readonly:
11383  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11384  */
11385 
11386 /* Python wrapper */
11387 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
11388 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
11389  int __pyx_r;
11390  __Pyx_RefNannyDeclarations
11391  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
11392  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
11393 
11394  /* function exit code */
11395  __Pyx_RefNannyFinishContext();
11396  return __pyx_r;
11397 }
11398 
11399 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
11400  int __pyx_r;
11401  __Pyx_TraceDeclarations
11402  __Pyx_RefNannyDeclarations
11403  int __pyx_t_1;
11404  int __pyx_t_2;
11405  PyObject *__pyx_t_3 = NULL;
11406  Py_ssize_t *__pyx_t_4;
11407  char *__pyx_t_5;
11408  void *__pyx_t_6;
11409  int __pyx_t_7;
11410  Py_ssize_t __pyx_t_8;
11411  int __pyx_lineno = 0;
11412  const char *__pyx_filename = NULL;
11413  int __pyx_clineno = 0;
11414  if (__pyx_v_info == NULL) {
11415  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
11416  return -1;
11417  }
11418  __Pyx_RefNannySetupContext("__getbuffer__", 0);
11419  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
11420  __Pyx_GIVEREF(__pyx_v_info->obj);
11421  __Pyx_TraceCall("__getbuffer__", __pyx_f[1], 520, 0, __PYX_ERR(1, 520, __pyx_L1_error));
11422 
11423  /* "View.MemoryView":521
11424  * @cname('getbuffer')
11425  * def __getbuffer__(self, Py_buffer *info, int flags):
11426  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
11427  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11428  *
11429  */
11430  __Pyx_TraceLine(521,0,__PYX_ERR(1, 521, __pyx_L1_error))
11431  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
11432  if (__pyx_t_2) {
11433  } else {
11434  __pyx_t_1 = __pyx_t_2;
11435  goto __pyx_L4_bool_binop_done;
11436  }
11437  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
11438  __pyx_t_1 = __pyx_t_2;
11439  __pyx_L4_bool_binop_done:;
11440  if (unlikely(__pyx_t_1)) {
11441 
11442  /* "View.MemoryView":522
11443  * def __getbuffer__(self, Py_buffer *info, int flags):
11444  * if flags & PyBUF_WRITABLE and self.view.readonly:
11445  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
11446  *
11447  * if flags & PyBUF_ND:
11448  */
11449  __Pyx_TraceLine(522,0,__PYX_ERR(1, 522, __pyx_L1_error))
11450  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 522, __pyx_L1_error)
11451  __Pyx_GOTREF(__pyx_t_3);
11452  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
11453  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11454  __PYX_ERR(1, 522, __pyx_L1_error)
11455 
11456  /* "View.MemoryView":521
11457  * @cname('getbuffer')
11458  * def __getbuffer__(self, Py_buffer *info, int flags):
11459  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
11460  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11461  *
11462  */
11463  }
11464 
11465  /* "View.MemoryView":524
11466  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11467  *
11468  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
11469  * info.shape = self.view.shape
11470  * else:
11471  */
11472  __Pyx_TraceLine(524,0,__PYX_ERR(1, 524, __pyx_L1_error))
11473  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
11474  if (__pyx_t_1) {
11475 
11476  /* "View.MemoryView":525
11477  *
11478  * if flags & PyBUF_ND:
11479  * info.shape = self.view.shape # <<<<<<<<<<<<<<
11480  * else:
11481  * info.shape = NULL
11482  */
11483  __Pyx_TraceLine(525,0,__PYX_ERR(1, 525, __pyx_L1_error))
11484  __pyx_t_4 = __pyx_v_self->view.shape;
11485  __pyx_v_info->shape = __pyx_t_4;
11486 
11487  /* "View.MemoryView":524
11488  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11489  *
11490  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
11491  * info.shape = self.view.shape
11492  * else:
11493  */
11494  goto __pyx_L6;
11495  }
11496 
11497  /* "View.MemoryView":527
11498  * info.shape = self.view.shape
11499  * else:
11500  * info.shape = NULL # <<<<<<<<<<<<<<
11501  *
11502  * if flags & PyBUF_STRIDES:
11503  */
11504  __Pyx_TraceLine(527,0,__PYX_ERR(1, 527, __pyx_L1_error))
11505  /*else*/ {
11506  __pyx_v_info->shape = NULL;
11507  }
11508  __pyx_L6:;
11509 
11510  /* "View.MemoryView":529
11511  * info.shape = NULL
11512  *
11513  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
11514  * info.strides = self.view.strides
11515  * else:
11516  */
11517  __Pyx_TraceLine(529,0,__PYX_ERR(1, 529, __pyx_L1_error))
11518  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
11519  if (__pyx_t_1) {
11520 
11521  /* "View.MemoryView":530
11522  *
11523  * if flags & PyBUF_STRIDES:
11524  * info.strides = self.view.strides # <<<<<<<<<<<<<<
11525  * else:
11526  * info.strides = NULL
11527  */
11528  __Pyx_TraceLine(530,0,__PYX_ERR(1, 530, __pyx_L1_error))
11529  __pyx_t_4 = __pyx_v_self->view.strides;
11530  __pyx_v_info->strides = __pyx_t_4;
11531 
11532  /* "View.MemoryView":529
11533  * info.shape = NULL
11534  *
11535  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
11536  * info.strides = self.view.strides
11537  * else:
11538  */
11539  goto __pyx_L7;
11540  }
11541 
11542  /* "View.MemoryView":532
11543  * info.strides = self.view.strides
11544  * else:
11545  * info.strides = NULL # <<<<<<<<<<<<<<
11546  *
11547  * if flags & PyBUF_INDIRECT:
11548  */
11549  __Pyx_TraceLine(532,0,__PYX_ERR(1, 532, __pyx_L1_error))
11550  /*else*/ {
11551  __pyx_v_info->strides = NULL;
11552  }
11553  __pyx_L7:;
11554 
11555  /* "View.MemoryView":534
11556  * info.strides = NULL
11557  *
11558  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
11559  * info.suboffsets = self.view.suboffsets
11560  * else:
11561  */
11562  __Pyx_TraceLine(534,0,__PYX_ERR(1, 534, __pyx_L1_error))
11563  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
11564  if (__pyx_t_1) {
11565 
11566  /* "View.MemoryView":535
11567  *
11568  * if flags & PyBUF_INDIRECT:
11569  * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
11570  * else:
11571  * info.suboffsets = NULL
11572  */
11573  __Pyx_TraceLine(535,0,__PYX_ERR(1, 535, __pyx_L1_error))
11574  __pyx_t_4 = __pyx_v_self->view.suboffsets;
11575  __pyx_v_info->suboffsets = __pyx_t_4;
11576 
11577  /* "View.MemoryView":534
11578  * info.strides = NULL
11579  *
11580  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
11581  * info.suboffsets = self.view.suboffsets
11582  * else:
11583  */
11584  goto __pyx_L8;
11585  }
11586 
11587  /* "View.MemoryView":537
11588  * info.suboffsets = self.view.suboffsets
11589  * else:
11590  * info.suboffsets = NULL # <<<<<<<<<<<<<<
11591  *
11592  * if flags & PyBUF_FORMAT:
11593  */
11594  __Pyx_TraceLine(537,0,__PYX_ERR(1, 537, __pyx_L1_error))
11595  /*else*/ {
11596  __pyx_v_info->suboffsets = NULL;
11597  }
11598  __pyx_L8:;
11599 
11600  /* "View.MemoryView":539
11601  * info.suboffsets = NULL
11602  *
11603  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
11604  * info.format = self.view.format
11605  * else:
11606  */
11607  __Pyx_TraceLine(539,0,__PYX_ERR(1, 539, __pyx_L1_error))
11608  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
11609  if (__pyx_t_1) {
11610 
11611  /* "View.MemoryView":540
11612  *
11613  * if flags & PyBUF_FORMAT:
11614  * info.format = self.view.format # <<<<<<<<<<<<<<
11615  * else:
11616  * info.format = NULL
11617  */
11618  __Pyx_TraceLine(540,0,__PYX_ERR(1, 540, __pyx_L1_error))
11619  __pyx_t_5 = __pyx_v_self->view.format;
11620  __pyx_v_info->format = __pyx_t_5;
11621 
11622  /* "View.MemoryView":539
11623  * info.suboffsets = NULL
11624  *
11625  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
11626  * info.format = self.view.format
11627  * else:
11628  */
11629  goto __pyx_L9;
11630  }
11631 
11632  /* "View.MemoryView":542
11633  * info.format = self.view.format
11634  * else:
11635  * info.format = NULL # <<<<<<<<<<<<<<
11636  *
11637  * info.buf = self.view.buf
11638  */
11639  __Pyx_TraceLine(542,0,__PYX_ERR(1, 542, __pyx_L1_error))
11640  /*else*/ {
11641  __pyx_v_info->format = NULL;
11642  }
11643  __pyx_L9:;
11644 
11645  /* "View.MemoryView":544
11646  * info.format = NULL
11647  *
11648  * info.buf = self.view.buf # <<<<<<<<<<<<<<
11649  * info.ndim = self.view.ndim
11650  * info.itemsize = self.view.itemsize
11651  */
11652  __Pyx_TraceLine(544,0,__PYX_ERR(1, 544, __pyx_L1_error))
11653  __pyx_t_6 = __pyx_v_self->view.buf;
11654  __pyx_v_info->buf = __pyx_t_6;
11655 
11656  /* "View.MemoryView":545
11657  *
11658  * info.buf = self.view.buf
11659  * info.ndim = self.view.ndim # <<<<<<<<<<<<<<
11660  * info.itemsize = self.view.itemsize
11661  * info.len = self.view.len
11662  */
11663  __Pyx_TraceLine(545,0,__PYX_ERR(1, 545, __pyx_L1_error))
11664  __pyx_t_7 = __pyx_v_self->view.ndim;
11665  __pyx_v_info->ndim = __pyx_t_7;
11666 
11667  /* "View.MemoryView":546
11668  * info.buf = self.view.buf
11669  * info.ndim = self.view.ndim
11670  * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
11671  * info.len = self.view.len
11672  * info.readonly = self.view.readonly
11673  */
11674  __Pyx_TraceLine(546,0,__PYX_ERR(1, 546, __pyx_L1_error))
11675  __pyx_t_8 = __pyx_v_self->view.itemsize;
11676  __pyx_v_info->itemsize = __pyx_t_8;
11677 
11678  /* "View.MemoryView":547
11679  * info.ndim = self.view.ndim
11680  * info.itemsize = self.view.itemsize
11681  * info.len = self.view.len # <<<<<<<<<<<<<<
11682  * info.readonly = self.view.readonly
11683  * info.obj = self
11684  */
11685  __Pyx_TraceLine(547,0,__PYX_ERR(1, 547, __pyx_L1_error))
11686  __pyx_t_8 = __pyx_v_self->view.len;
11687  __pyx_v_info->len = __pyx_t_8;
11688 
11689  /* "View.MemoryView":548
11690  * info.itemsize = self.view.itemsize
11691  * info.len = self.view.len
11692  * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
11693  * info.obj = self
11694  *
11695  */
11696  __Pyx_TraceLine(548,0,__PYX_ERR(1, 548, __pyx_L1_error))
11697  __pyx_t_1 = __pyx_v_self->view.readonly;
11698  __pyx_v_info->readonly = __pyx_t_1;
11699 
11700  /* "View.MemoryView":549
11701  * info.len = self.view.len
11702  * info.readonly = self.view.readonly
11703  * info.obj = self # <<<<<<<<<<<<<<
11704  *
11705  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
11706  */
11707  __Pyx_TraceLine(549,0,__PYX_ERR(1, 549, __pyx_L1_error))
11708  __Pyx_INCREF(((PyObject *)__pyx_v_self));
11709  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
11710  __Pyx_GOTREF(__pyx_v_info->obj);
11711  __Pyx_DECREF(__pyx_v_info->obj);
11712  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
11713 
11714  /* "View.MemoryView":520
11715  *
11716  * @cname('getbuffer')
11717  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
11718  * if flags & PyBUF_WRITABLE and self.view.readonly:
11719  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11720  */
11721 
11722  /* function exit code */
11723  __pyx_r = 0;
11724  goto __pyx_L0;
11725  __pyx_L1_error:;
11726  __Pyx_XDECREF(__pyx_t_3);
11727  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11728  __pyx_r = -1;
11729  if (__pyx_v_info->obj != NULL) {
11730  __Pyx_GOTREF(__pyx_v_info->obj);
11731  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
11732  }
11733  goto __pyx_L2;
11734  __pyx_L0:;
11735  if (__pyx_v_info->obj == Py_None) {
11736  __Pyx_GOTREF(__pyx_v_info->obj);
11737  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
11738  }
11739  __pyx_L2:;
11740  __Pyx_TraceReturn(Py_None, 0);
11741  __Pyx_RefNannyFinishContext();
11742  return __pyx_r;
11743 }
11744 
11745 /* "View.MemoryView":555
11746  *
11747  * @property
11748  * def T(self): # <<<<<<<<<<<<<<
11749  * cdef _memoryviewslice result = memoryview_copy(self)
11750  * transpose_memslice(&result.from_slice)
11751  */
11752 
11753 /* Python wrapper */
11754 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
11755 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
11756  PyObject *__pyx_r = 0;
11757  __Pyx_RefNannyDeclarations
11758  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11759  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11760 
11761  /* function exit code */
11762  __Pyx_RefNannyFinishContext();
11763  return __pyx_r;
11764 }
11765 
11766 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11767  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
11768  PyObject *__pyx_r = NULL;
11769  __Pyx_TraceDeclarations
11770  __Pyx_RefNannyDeclarations
11771  PyObject *__pyx_t_1 = NULL;
11772  int __pyx_t_2;
11773  int __pyx_lineno = 0;
11774  const char *__pyx_filename = NULL;
11775  int __pyx_clineno = 0;
11776  __Pyx_RefNannySetupContext("__get__", 0);
11777  __Pyx_TraceCall("__get__", __pyx_f[1], 555, 0, __PYX_ERR(1, 555, __pyx_L1_error));
11778 
11779  /* "View.MemoryView":556
11780  * @property
11781  * def T(self):
11782  * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
11783  * transpose_memslice(&result.from_slice)
11784  * return result
11785  */
11786  __Pyx_TraceLine(556,0,__PYX_ERR(1, 556, __pyx_L1_error))
11787  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
11788  __Pyx_GOTREF(__pyx_t_1);
11789  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error)
11790  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
11791  __pyx_t_1 = 0;
11792 
11793  /* "View.MemoryView":557
11794  * def T(self):
11795  * cdef _memoryviewslice result = memoryview_copy(self)
11796  * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
11797  * return result
11798  *
11799  */
11800  __Pyx_TraceLine(557,0,__PYX_ERR(1, 557, __pyx_L1_error))
11801  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 557, __pyx_L1_error)
11802 
11803  /* "View.MemoryView":558
11804  * cdef _memoryviewslice result = memoryview_copy(self)
11805  * transpose_memslice(&result.from_slice)
11806  * return result # <<<<<<<<<<<<<<
11807  *
11808  * @property
11809  */
11810  __Pyx_TraceLine(558,0,__PYX_ERR(1, 558, __pyx_L1_error))
11811  __Pyx_XDECREF(__pyx_r);
11812  __Pyx_INCREF(((PyObject *)__pyx_v_result));
11813  __pyx_r = ((PyObject *)__pyx_v_result);
11814  goto __pyx_L0;
11815 
11816  /* "View.MemoryView":555
11817  *
11818  * @property
11819  * def T(self): # <<<<<<<<<<<<<<
11820  * cdef _memoryviewslice result = memoryview_copy(self)
11821  * transpose_memslice(&result.from_slice)
11822  */
11823 
11824  /* function exit code */
11825  __pyx_L1_error:;
11826  __Pyx_XDECREF(__pyx_t_1);
11827  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11828  __pyx_r = NULL;
11829  __pyx_L0:;
11830  __Pyx_XDECREF((PyObject *)__pyx_v_result);
11831  __Pyx_XGIVEREF(__pyx_r);
11832  __Pyx_TraceReturn(__pyx_r, 0);
11833  __Pyx_RefNannyFinishContext();
11834  return __pyx_r;
11835 }
11836 
11837 /* "View.MemoryView":561
11838  *
11839  * @property
11840  * def base(self): # <<<<<<<<<<<<<<
11841  * return self.obj
11842  *
11843  */
11844 
11845 /* Python wrapper */
11846 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
11847 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
11848  PyObject *__pyx_r = 0;
11849  __Pyx_RefNannyDeclarations
11850  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11851  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11852 
11853  /* function exit code */
11854  __Pyx_RefNannyFinishContext();
11855  return __pyx_r;
11856 }
11857 
11858 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11859  PyObject *__pyx_r = NULL;
11860  __Pyx_TraceDeclarations
11861  __Pyx_RefNannyDeclarations
11862  int __pyx_lineno = 0;
11863  const char *__pyx_filename = NULL;
11864  int __pyx_clineno = 0;
11865  __Pyx_RefNannySetupContext("__get__", 0);
11866  __Pyx_TraceCall("__get__", __pyx_f[1], 561, 0, __PYX_ERR(1, 561, __pyx_L1_error));
11867 
11868  /* "View.MemoryView":562
11869  * @property
11870  * def base(self):
11871  * return self.obj # <<<<<<<<<<<<<<
11872  *
11873  * @property
11874  */
11875  __Pyx_TraceLine(562,0,__PYX_ERR(1, 562, __pyx_L1_error))
11876  __Pyx_XDECREF(__pyx_r);
11877  __Pyx_INCREF(__pyx_v_self->obj);
11878  __pyx_r = __pyx_v_self->obj;
11879  goto __pyx_L0;
11880 
11881  /* "View.MemoryView":561
11882  *
11883  * @property
11884  * def base(self): # <<<<<<<<<<<<<<
11885  * return self.obj
11886  *
11887  */
11888 
11889  /* function exit code */
11890  __pyx_L1_error:;
11891  __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11892  __pyx_r = NULL;
11893  __pyx_L0:;
11894  __Pyx_XGIVEREF(__pyx_r);
11895  __Pyx_TraceReturn(__pyx_r, 0);
11896  __Pyx_RefNannyFinishContext();
11897  return __pyx_r;
11898 }
11899 
11900 /* "View.MemoryView":565
11901  *
11902  * @property
11903  * def shape(self): # <<<<<<<<<<<<<<
11904  * return tuple([length for length in self.view.shape[:self.view.ndim]])
11905  *
11906  */
11907 
11908 /* Python wrapper */
11909 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
11910 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
11911  PyObject *__pyx_r = 0;
11912  __Pyx_RefNannyDeclarations
11913  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11914  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11915 
11916  /* function exit code */
11917  __Pyx_RefNannyFinishContext();
11918  return __pyx_r;
11919 }
11920 
11921 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11922  Py_ssize_t __pyx_v_length;
11923  PyObject *__pyx_r = NULL;
11924  __Pyx_TraceDeclarations
11925  __Pyx_RefNannyDeclarations
11926  PyObject *__pyx_t_1 = NULL;
11927  Py_ssize_t *__pyx_t_2;
11928  Py_ssize_t *__pyx_t_3;
11929  Py_ssize_t *__pyx_t_4;
11930  PyObject *__pyx_t_5 = NULL;
11931  int __pyx_lineno = 0;
11932  const char *__pyx_filename = NULL;
11933  int __pyx_clineno = 0;
11934  __Pyx_RefNannySetupContext("__get__", 0);
11935  __Pyx_TraceCall("__get__", __pyx_f[1], 565, 0, __PYX_ERR(1, 565, __pyx_L1_error));
11936 
11937  /* "View.MemoryView":566
11938  * @property
11939  * def shape(self):
11940  * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
11941  *
11942  * @property
11943  */
11944  __Pyx_TraceLine(566,0,__PYX_ERR(1, 566, __pyx_L1_error))
11945  __Pyx_XDECREF(__pyx_r);
11946  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error)
11947  __Pyx_GOTREF(__pyx_t_1);
11948  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
11949  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
11950  __pyx_t_2 = __pyx_t_4;
11951  __pyx_v_length = (__pyx_t_2[0]);
11952  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 566, __pyx_L1_error)
11953  __Pyx_GOTREF(__pyx_t_5);
11954  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 566, __pyx_L1_error)
11955  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11956  }
11957  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 566, __pyx_L1_error)
11958  __Pyx_GOTREF(__pyx_t_5);
11959  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11960  __pyx_r = __pyx_t_5;
11961  __pyx_t_5 = 0;
11962  goto __pyx_L0;
11963 
11964  /* "View.MemoryView":565
11965  *
11966  * @property
11967  * def shape(self): # <<<<<<<<<<<<<<
11968  * return tuple([length for length in self.view.shape[:self.view.ndim]])
11969  *
11970  */
11971 
11972  /* function exit code */
11973  __pyx_L1_error:;
11974  __Pyx_XDECREF(__pyx_t_1);
11975  __Pyx_XDECREF(__pyx_t_5);
11976  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11977  __pyx_r = NULL;
11978  __pyx_L0:;
11979  __Pyx_XGIVEREF(__pyx_r);
11980  __Pyx_TraceReturn(__pyx_r, 0);
11981  __Pyx_RefNannyFinishContext();
11982  return __pyx_r;
11983 }
11984 
11985 /* "View.MemoryView":569
11986  *
11987  * @property
11988  * def strides(self): # <<<<<<<<<<<<<<
11989  * if self.view.strides == NULL:
11990  *
11991  */
11992 
11993 /* Python wrapper */
11994 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
11995 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
11996  PyObject *__pyx_r = 0;
11997  __Pyx_RefNannyDeclarations
11998  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11999  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12000 
12001  /* function exit code */
12002  __Pyx_RefNannyFinishContext();
12003  return __pyx_r;
12004 }
12005 
12006 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12007  Py_ssize_t __pyx_v_stride;
12008  PyObject *__pyx_r = NULL;
12009  __Pyx_TraceDeclarations
12010  __Pyx_RefNannyDeclarations
12011  int __pyx_t_1;
12012  PyObject *__pyx_t_2 = NULL;
12013  Py_ssize_t *__pyx_t_3;
12014  Py_ssize_t *__pyx_t_4;
12015  Py_ssize_t *__pyx_t_5;
12016  PyObject *__pyx_t_6 = NULL;
12017  int __pyx_lineno = 0;
12018  const char *__pyx_filename = NULL;
12019  int __pyx_clineno = 0;
12020  __Pyx_RefNannySetupContext("__get__", 0);
12021  __Pyx_TraceCall("__get__", __pyx_f[1], 569, 0, __PYX_ERR(1, 569, __pyx_L1_error));
12022 
12023  /* "View.MemoryView":570
12024  * @property
12025  * def strides(self):
12026  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
12027  *
12028  * raise ValueError("Buffer view does not expose strides")
12029  */
12030  __Pyx_TraceLine(570,0,__PYX_ERR(1, 570, __pyx_L1_error))
12031  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
12032  if (unlikely(__pyx_t_1)) {
12033 
12034  /* "View.MemoryView":572
12035  * if self.view.strides == NULL:
12036  *
12037  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
12038  *
12039  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
12040  */
12041  __Pyx_TraceLine(572,0,__PYX_ERR(1, 572, __pyx_L1_error))
12042  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 572, __pyx_L1_error)
12043  __Pyx_GOTREF(__pyx_t_2);
12044  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12045  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12046  __PYX_ERR(1, 572, __pyx_L1_error)
12047 
12048  /* "View.MemoryView":570
12049  * @property
12050  * def strides(self):
12051  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
12052  *
12053  * raise ValueError("Buffer view does not expose strides")
12054  */
12055  }
12056 
12057  /* "View.MemoryView":574
12058  * raise ValueError("Buffer view does not expose strides")
12059  *
12060  * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
12061  *
12062  * @property
12063  */
12064  __Pyx_TraceLine(574,0,__PYX_ERR(1, 574, __pyx_L1_error))
12065  __Pyx_XDECREF(__pyx_r);
12066  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 574, __pyx_L1_error)
12067  __Pyx_GOTREF(__pyx_t_2);
12068  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
12069  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
12070  __pyx_t_3 = __pyx_t_5;
12071  __pyx_v_stride = (__pyx_t_3[0]);
12072  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 574, __pyx_L1_error)
12073  __Pyx_GOTREF(__pyx_t_6);
12074  if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 574, __pyx_L1_error)
12075  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12076  }
12077  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 574, __pyx_L1_error)
12078  __Pyx_GOTREF(__pyx_t_6);
12079  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12080  __pyx_r = __pyx_t_6;
12081  __pyx_t_6 = 0;
12082  goto __pyx_L0;
12083 
12084  /* "View.MemoryView":569
12085  *
12086  * @property
12087  * def strides(self): # <<<<<<<<<<<<<<
12088  * if self.view.strides == NULL:
12089  *
12090  */
12091 
12092  /* function exit code */
12093  __pyx_L1_error:;
12094  __Pyx_XDECREF(__pyx_t_2);
12095  __Pyx_XDECREF(__pyx_t_6);
12096  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12097  __pyx_r = NULL;
12098  __pyx_L0:;
12099  __Pyx_XGIVEREF(__pyx_r);
12100  __Pyx_TraceReturn(__pyx_r, 0);
12101  __Pyx_RefNannyFinishContext();
12102  return __pyx_r;
12103 }
12104 
12105 /* "View.MemoryView":577
12106  *
12107  * @property
12108  * def suboffsets(self): # <<<<<<<<<<<<<<
12109  * if self.view.suboffsets == NULL:
12110  * return (-1,) * self.view.ndim
12111  */
12112 
12113 /* Python wrapper */
12114 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
12115 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
12116  PyObject *__pyx_r = 0;
12117  __Pyx_RefNannyDeclarations
12118  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12119  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12120 
12121  /* function exit code */
12122  __Pyx_RefNannyFinishContext();
12123  return __pyx_r;
12124 }
12125 
12126 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12127  Py_ssize_t __pyx_v_suboffset;
12128  PyObject *__pyx_r = NULL;
12129  __Pyx_TraceDeclarations
12130  __Pyx_RefNannyDeclarations
12131  int __pyx_t_1;
12132  PyObject *__pyx_t_2 = NULL;
12133  PyObject *__pyx_t_3 = NULL;
12134  Py_ssize_t *__pyx_t_4;
12135  Py_ssize_t *__pyx_t_5;
12136  Py_ssize_t *__pyx_t_6;
12137  int __pyx_lineno = 0;
12138  const char *__pyx_filename = NULL;
12139  int __pyx_clineno = 0;
12140  __Pyx_RefNannySetupContext("__get__", 0);
12141  __Pyx_TraceCall("__get__", __pyx_f[1], 577, 0, __PYX_ERR(1, 577, __pyx_L1_error));
12142 
12143  /* "View.MemoryView":578
12144  * @property
12145  * def suboffsets(self):
12146  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
12147  * return (-1,) * self.view.ndim
12148  *
12149  */
12150  __Pyx_TraceLine(578,0,__PYX_ERR(1, 578, __pyx_L1_error))
12151  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
12152  if (__pyx_t_1) {
12153 
12154  /* "View.MemoryView":579
12155  * def suboffsets(self):
12156  * if self.view.suboffsets == NULL:
12157  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
12158  *
12159  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
12160  */
12161  __Pyx_TraceLine(579,0,__PYX_ERR(1, 579, __pyx_L1_error))
12162  __Pyx_XDECREF(__pyx_r);
12163  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 579, __pyx_L1_error)
12164  __Pyx_GOTREF(__pyx_t_2);
12165  __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__29, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 579, __pyx_L1_error)
12166  __Pyx_GOTREF(__pyx_t_3);
12167  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12168  __pyx_r = __pyx_t_3;
12169  __pyx_t_3 = 0;
12170  goto __pyx_L0;
12171 
12172  /* "View.MemoryView":578
12173  * @property
12174  * def suboffsets(self):
12175  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
12176  * return (-1,) * self.view.ndim
12177  *
12178  */
12179  }
12180 
12181  /* "View.MemoryView":581
12182  * return (-1,) * self.view.ndim
12183  *
12184  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
12185  *
12186  * @property
12187  */
12188  __Pyx_TraceLine(581,0,__PYX_ERR(1, 581, __pyx_L1_error))
12189  __Pyx_XDECREF(__pyx_r);
12190  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 581, __pyx_L1_error)
12191  __Pyx_GOTREF(__pyx_t_3);
12192  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
12193  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
12194  __pyx_t_4 = __pyx_t_6;
12195  __pyx_v_suboffset = (__pyx_t_4[0]);
12196  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error)
12197  __Pyx_GOTREF(__pyx_t_2);
12198  if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 581, __pyx_L1_error)
12199  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12200  }
12201  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error)
12202  __Pyx_GOTREF(__pyx_t_2);
12203  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12204  __pyx_r = __pyx_t_2;
12205  __pyx_t_2 = 0;
12206  goto __pyx_L0;
12207 
12208  /* "View.MemoryView":577
12209  *
12210  * @property
12211  * def suboffsets(self): # <<<<<<<<<<<<<<
12212  * if self.view.suboffsets == NULL:
12213  * return (-1,) * self.view.ndim
12214  */
12215 
12216  /* function exit code */
12217  __pyx_L1_error:;
12218  __Pyx_XDECREF(__pyx_t_2);
12219  __Pyx_XDECREF(__pyx_t_3);
12220  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12221  __pyx_r = NULL;
12222  __pyx_L0:;
12223  __Pyx_XGIVEREF(__pyx_r);
12224  __Pyx_TraceReturn(__pyx_r, 0);
12225  __Pyx_RefNannyFinishContext();
12226  return __pyx_r;
12227 }
12228 
12229 /* "View.MemoryView":584
12230  *
12231  * @property
12232  * def ndim(self): # <<<<<<<<<<<<<<
12233  * return self.view.ndim
12234  *
12235  */
12236 
12237 /* Python wrapper */
12238 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
12239 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
12240  PyObject *__pyx_r = 0;
12241  __Pyx_RefNannyDeclarations
12242  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12243  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12244 
12245  /* function exit code */
12246  __Pyx_RefNannyFinishContext();
12247  return __pyx_r;
12248 }
12249 
12250 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12251  PyObject *__pyx_r = NULL;
12252  __Pyx_TraceDeclarations
12253  __Pyx_RefNannyDeclarations
12254  PyObject *__pyx_t_1 = NULL;
12255  int __pyx_lineno = 0;
12256  const char *__pyx_filename = NULL;
12257  int __pyx_clineno = 0;
12258  __Pyx_RefNannySetupContext("__get__", 0);
12259  __Pyx_TraceCall("__get__", __pyx_f[1], 584, 0, __PYX_ERR(1, 584, __pyx_L1_error));
12260 
12261  /* "View.MemoryView":585
12262  * @property
12263  * def ndim(self):
12264  * return self.view.ndim # <<<<<<<<<<<<<<
12265  *
12266  * @property
12267  */
12268  __Pyx_TraceLine(585,0,__PYX_ERR(1, 585, __pyx_L1_error))
12269  __Pyx_XDECREF(__pyx_r);
12270  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 585, __pyx_L1_error)
12271  __Pyx_GOTREF(__pyx_t_1);
12272  __pyx_r = __pyx_t_1;
12273  __pyx_t_1 = 0;
12274  goto __pyx_L0;
12275 
12276  /* "View.MemoryView":584
12277  *
12278  * @property
12279  * def ndim(self): # <<<<<<<<<<<<<<
12280  * return self.view.ndim
12281  *
12282  */
12283 
12284  /* function exit code */
12285  __pyx_L1_error:;
12286  __Pyx_XDECREF(__pyx_t_1);
12287  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12288  __pyx_r = NULL;
12289  __pyx_L0:;
12290  __Pyx_XGIVEREF(__pyx_r);
12291  __Pyx_TraceReturn(__pyx_r, 0);
12292  __Pyx_RefNannyFinishContext();
12293  return __pyx_r;
12294 }
12295 
12296 /* "View.MemoryView":588
12297  *
12298  * @property
12299  * def itemsize(self): # <<<<<<<<<<<<<<
12300  * return self.view.itemsize
12301  *
12302  */
12303 
12304 /* Python wrapper */
12305 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
12306 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
12307  PyObject *__pyx_r = 0;
12308  __Pyx_RefNannyDeclarations
12309  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12310  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12311 
12312  /* function exit code */
12313  __Pyx_RefNannyFinishContext();
12314  return __pyx_r;
12315 }
12316 
12317 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12318  PyObject *__pyx_r = NULL;
12319  __Pyx_TraceDeclarations
12320  __Pyx_RefNannyDeclarations
12321  PyObject *__pyx_t_1 = NULL;
12322  int __pyx_lineno = 0;
12323  const char *__pyx_filename = NULL;
12324  int __pyx_clineno = 0;
12325  __Pyx_RefNannySetupContext("__get__", 0);
12326  __Pyx_TraceCall("__get__", __pyx_f[1], 588, 0, __PYX_ERR(1, 588, __pyx_L1_error));
12327 
12328  /* "View.MemoryView":589
12329  * @property
12330  * def itemsize(self):
12331  * return self.view.itemsize # <<<<<<<<<<<<<<
12332  *
12333  * @property
12334  */
12335  __Pyx_TraceLine(589,0,__PYX_ERR(1, 589, __pyx_L1_error))
12336  __Pyx_XDECREF(__pyx_r);
12337  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 589, __pyx_L1_error)
12338  __Pyx_GOTREF(__pyx_t_1);
12339  __pyx_r = __pyx_t_1;
12340  __pyx_t_1 = 0;
12341  goto __pyx_L0;
12342 
12343  /* "View.MemoryView":588
12344  *
12345  * @property
12346  * def itemsize(self): # <<<<<<<<<<<<<<
12347  * return self.view.itemsize
12348  *
12349  */
12350 
12351  /* function exit code */
12352  __pyx_L1_error:;
12353  __Pyx_XDECREF(__pyx_t_1);
12354  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12355  __pyx_r = NULL;
12356  __pyx_L0:;
12357  __Pyx_XGIVEREF(__pyx_r);
12358  __Pyx_TraceReturn(__pyx_r, 0);
12359  __Pyx_RefNannyFinishContext();
12360  return __pyx_r;
12361 }
12362 
12363 /* "View.MemoryView":592
12364  *
12365  * @property
12366  * def nbytes(self): # <<<<<<<<<<<<<<
12367  * return self.size * self.view.itemsize
12368  *
12369  */
12370 
12371 /* Python wrapper */
12372 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
12373 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
12374  PyObject *__pyx_r = 0;
12375  __Pyx_RefNannyDeclarations
12376  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12377  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12378 
12379  /* function exit code */
12380  __Pyx_RefNannyFinishContext();
12381  return __pyx_r;
12382 }
12383 
12384 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12385  PyObject *__pyx_r = NULL;
12386  __Pyx_TraceDeclarations
12387  __Pyx_RefNannyDeclarations
12388  PyObject *__pyx_t_1 = NULL;
12389  PyObject *__pyx_t_2 = NULL;
12390  PyObject *__pyx_t_3 = NULL;
12391  int __pyx_lineno = 0;
12392  const char *__pyx_filename = NULL;
12393  int __pyx_clineno = 0;
12394  __Pyx_RefNannySetupContext("__get__", 0);
12395  __Pyx_TraceCall("__get__", __pyx_f[1], 592, 0, __PYX_ERR(1, 592, __pyx_L1_error));
12396 
12397  /* "View.MemoryView":593
12398  * @property
12399  * def nbytes(self):
12400  * return self.size * self.view.itemsize # <<<<<<<<<<<<<<
12401  *
12402  * @property
12403  */
12404  __Pyx_TraceLine(593,0,__PYX_ERR(1, 593, __pyx_L1_error))
12405  __Pyx_XDECREF(__pyx_r);
12406  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error)
12407  __Pyx_GOTREF(__pyx_t_1);
12408  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 593, __pyx_L1_error)
12409  __Pyx_GOTREF(__pyx_t_2);
12410  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 593, __pyx_L1_error)
12411  __Pyx_GOTREF(__pyx_t_3);
12412  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12413  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12414  __pyx_r = __pyx_t_3;
12415  __pyx_t_3 = 0;
12416  goto __pyx_L0;
12417 
12418  /* "View.MemoryView":592
12419  *
12420  * @property
12421  * def nbytes(self): # <<<<<<<<<<<<<<
12422  * return self.size * self.view.itemsize
12423  *
12424  */
12425 
12426  /* function exit code */
12427  __pyx_L1_error:;
12428  __Pyx_XDECREF(__pyx_t_1);
12429  __Pyx_XDECREF(__pyx_t_2);
12430  __Pyx_XDECREF(__pyx_t_3);
12431  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12432  __pyx_r = NULL;
12433  __pyx_L0:;
12434  __Pyx_XGIVEREF(__pyx_r);
12435  __Pyx_TraceReturn(__pyx_r, 0);
12436  __Pyx_RefNannyFinishContext();
12437  return __pyx_r;
12438 }
12439 
12440 /* "View.MemoryView":596
12441  *
12442  * @property
12443  * def size(self): # <<<<<<<<<<<<<<
12444  * if self._size is None:
12445  * result = 1
12446  */
12447 
12448 /* Python wrapper */
12449 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
12450 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
12451  PyObject *__pyx_r = 0;
12452  __Pyx_RefNannyDeclarations
12453  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12454  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12455 
12456  /* function exit code */
12457  __Pyx_RefNannyFinishContext();
12458  return __pyx_r;
12459 }
12460 
12461 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12462  PyObject *__pyx_v_result = NULL;
12463  PyObject *__pyx_v_length = NULL;
12464  PyObject *__pyx_r = NULL;
12465  __Pyx_TraceDeclarations
12466  __Pyx_RefNannyDeclarations
12467  int __pyx_t_1;
12468  int __pyx_t_2;
12469  Py_ssize_t *__pyx_t_3;
12470  Py_ssize_t *__pyx_t_4;
12471  Py_ssize_t *__pyx_t_5;
12472  PyObject *__pyx_t_6 = NULL;
12473  int __pyx_lineno = 0;
12474  const char *__pyx_filename = NULL;
12475  int __pyx_clineno = 0;
12476  __Pyx_RefNannySetupContext("__get__", 0);
12477  __Pyx_TraceCall("__get__", __pyx_f[1], 596, 0, __PYX_ERR(1, 596, __pyx_L1_error));
12478 
12479  /* "View.MemoryView":597
12480  * @property
12481  * def size(self):
12482  * if self._size is None: # <<<<<<<<<<<<<<
12483  * result = 1
12484  *
12485  */
12486  __Pyx_TraceLine(597,0,__PYX_ERR(1, 597, __pyx_L1_error))
12487  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
12488  __pyx_t_2 = (__pyx_t_1 != 0);
12489  if (__pyx_t_2) {
12490 
12491  /* "View.MemoryView":598
12492  * def size(self):
12493  * if self._size is None:
12494  * result = 1 # <<<<<<<<<<<<<<
12495  *
12496  * for length in self.view.shape[:self.view.ndim]:
12497  */
12498  __Pyx_TraceLine(598,0,__PYX_ERR(1, 598, __pyx_L1_error))
12499  __Pyx_INCREF(__pyx_int_1);
12500  __pyx_v_result = __pyx_int_1;
12501 
12502  /* "View.MemoryView":600
12503  * result = 1
12504  *
12505  * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
12506  * result *= length
12507  *
12508  */
12509  __Pyx_TraceLine(600,0,__PYX_ERR(1, 600, __pyx_L1_error))
12510  __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
12511  for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
12512  __pyx_t_3 = __pyx_t_5;
12513  __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 600, __pyx_L1_error)
12514  __Pyx_GOTREF(__pyx_t_6);
12515  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
12516  __pyx_t_6 = 0;
12517 
12518  /* "View.MemoryView":601
12519  *
12520  * for length in self.view.shape[:self.view.ndim]:
12521  * result *= length # <<<<<<<<<<<<<<
12522  *
12523  * self._size = result
12524  */
12525  __Pyx_TraceLine(601,0,__PYX_ERR(1, 601, __pyx_L1_error))
12526  __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 601, __pyx_L1_error)
12527  __Pyx_GOTREF(__pyx_t_6);
12528  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
12529  __pyx_t_6 = 0;
12530  }
12531 
12532  /* "View.MemoryView":603
12533  * result *= length
12534  *
12535  * self._size = result # <<<<<<<<<<<<<<
12536  *
12537  * return self._size
12538  */
12539  __Pyx_TraceLine(603,0,__PYX_ERR(1, 603, __pyx_L1_error))
12540  __Pyx_INCREF(__pyx_v_result);
12541  __Pyx_GIVEREF(__pyx_v_result);
12542  __Pyx_GOTREF(__pyx_v_self->_size);
12543  __Pyx_DECREF(__pyx_v_self->_size);
12544  __pyx_v_self->_size = __pyx_v_result;
12545 
12546  /* "View.MemoryView":597
12547  * @property
12548  * def size(self):
12549  * if self._size is None: # <<<<<<<<<<<<<<
12550  * result = 1
12551  *
12552  */
12553  }
12554 
12555  /* "View.MemoryView":605
12556  * self._size = result
12557  *
12558  * return self._size # <<<<<<<<<<<<<<
12559  *
12560  * def __len__(self):
12561  */
12562  __Pyx_TraceLine(605,0,__PYX_ERR(1, 605, __pyx_L1_error))
12563  __Pyx_XDECREF(__pyx_r);
12564  __Pyx_INCREF(__pyx_v_self->_size);
12565  __pyx_r = __pyx_v_self->_size;
12566  goto __pyx_L0;
12567 
12568  /* "View.MemoryView":596
12569  *
12570  * @property
12571  * def size(self): # <<<<<<<<<<<<<<
12572  * if self._size is None:
12573  * result = 1
12574  */
12575 
12576  /* function exit code */
12577  __pyx_L1_error:;
12578  __Pyx_XDECREF(__pyx_t_6);
12579  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12580  __pyx_r = NULL;
12581  __pyx_L0:;
12582  __Pyx_XDECREF(__pyx_v_result);
12583  __Pyx_XDECREF(__pyx_v_length);
12584  __Pyx_XGIVEREF(__pyx_r);
12585  __Pyx_TraceReturn(__pyx_r, 0);
12586  __Pyx_RefNannyFinishContext();
12587  return __pyx_r;
12588 }
12589 
12590 /* "View.MemoryView":607
12591  * return self._size
12592  *
12593  * def __len__(self): # <<<<<<<<<<<<<<
12594  * if self.view.ndim >= 1:
12595  * return self.view.shape[0]
12596  */
12597 
12598 /* Python wrapper */
12599 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
12600 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
12601  Py_ssize_t __pyx_r;
12602  __Pyx_RefNannyDeclarations
12603  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
12604  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12605 
12606  /* function exit code */
12607  __Pyx_RefNannyFinishContext();
12608  return __pyx_r;
12609 }
12610 
12611 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
12612  Py_ssize_t __pyx_r;
12613  __Pyx_TraceDeclarations
12614  __Pyx_RefNannyDeclarations
12615  int __pyx_t_1;
12616  int __pyx_lineno = 0;
12617  const char *__pyx_filename = NULL;
12618  int __pyx_clineno = 0;
12619  __Pyx_RefNannySetupContext("__len__", 0);
12620  __Pyx_TraceCall("__len__", __pyx_f[1], 607, 0, __PYX_ERR(1, 607, __pyx_L1_error));
12621 
12622  /* "View.MemoryView":608
12623  *
12624  * def __len__(self):
12625  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
12626  * return self.view.shape[0]
12627  *
12628  */
12629  __Pyx_TraceLine(608,0,__PYX_ERR(1, 608, __pyx_L1_error))
12630  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
12631  if (__pyx_t_1) {
12632 
12633  /* "View.MemoryView":609
12634  * def __len__(self):
12635  * if self.view.ndim >= 1:
12636  * return self.view.shape[0] # <<<<<<<<<<<<<<
12637  *
12638  * return 0
12639  */
12640  __Pyx_TraceLine(609,0,__PYX_ERR(1, 609, __pyx_L1_error))
12641  __pyx_r = (__pyx_v_self->view.shape[0]);
12642  goto __pyx_L0;
12643 
12644  /* "View.MemoryView":608
12645  *
12646  * def __len__(self):
12647  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
12648  * return self.view.shape[0]
12649  *
12650  */
12651  }
12652 
12653  /* "View.MemoryView":611
12654  * return self.view.shape[0]
12655  *
12656  * return 0 # <<<<<<<<<<<<<<
12657  *
12658  * def __repr__(self):
12659  */
12660  __Pyx_TraceLine(611,0,__PYX_ERR(1, 611, __pyx_L1_error))
12661  __pyx_r = 0;
12662  goto __pyx_L0;
12663 
12664  /* "View.MemoryView":607
12665  * return self._size
12666  *
12667  * def __len__(self): # <<<<<<<<<<<<<<
12668  * if self.view.ndim >= 1:
12669  * return self.view.shape[0]
12670  */
12671 
12672  /* function exit code */
12673  __pyx_L1_error:;
12674  __Pyx_AddTraceback("View.MemoryView.memoryview.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12675  __pyx_r = -1;
12676  __pyx_L0:;
12677  __Pyx_TraceReturn(Py_None, 0);
12678  __Pyx_RefNannyFinishContext();
12679  return __pyx_r;
12680 }
12681 
12682 /* "View.MemoryView":613
12683  * return 0
12684  *
12685  * def __repr__(self): # <<<<<<<<<<<<<<
12686  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
12687  * id(self))
12688  */
12689 
12690 /* Python wrapper */
12691 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
12692 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
12693  PyObject *__pyx_r = 0;
12694  __Pyx_RefNannyDeclarations
12695  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
12696  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12697 
12698  /* function exit code */
12699  __Pyx_RefNannyFinishContext();
12700  return __pyx_r;
12701 }
12702 
12703 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
12704  PyObject *__pyx_r = NULL;
12705  __Pyx_TraceDeclarations
12706  __Pyx_RefNannyDeclarations
12707  PyObject *__pyx_t_1 = NULL;
12708  PyObject *__pyx_t_2 = NULL;
12709  PyObject *__pyx_t_3 = NULL;
12710  int __pyx_lineno = 0;
12711  const char *__pyx_filename = NULL;
12712  int __pyx_clineno = 0;
12713  __Pyx_RefNannySetupContext("__repr__", 0);
12714  __Pyx_TraceCall("__repr__", __pyx_f[1], 613, 0, __PYX_ERR(1, 613, __pyx_L1_error));
12715 
12716  /* "View.MemoryView":614
12717  *
12718  * def __repr__(self):
12719  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
12720  * id(self))
12721  *
12722  */
12723  __Pyx_TraceLine(614,0,__PYX_ERR(1, 614, __pyx_L1_error))
12724  __Pyx_XDECREF(__pyx_r);
12725  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error)
12726  __Pyx_GOTREF(__pyx_t_1);
12727  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __pyx_L1_error)
12728  __Pyx_GOTREF(__pyx_t_2);
12729  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12730  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error)
12731  __Pyx_GOTREF(__pyx_t_1);
12732  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12733 
12734  /* "View.MemoryView":615
12735  * def __repr__(self):
12736  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
12737  * id(self)) # <<<<<<<<<<<<<<
12738  *
12739  * def __str__(self):
12740  */
12741  __Pyx_TraceLine(615,0,__PYX_ERR(1, 615, __pyx_L1_error))
12742  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 615, __pyx_L1_error)
12743  __Pyx_GOTREF(__pyx_t_2);
12744 
12745  /* "View.MemoryView":614
12746  *
12747  * def __repr__(self):
12748  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
12749  * id(self))
12750  *
12751  */
12752  __Pyx_TraceLine(614,0,__PYX_ERR(1, 614, __pyx_L1_error))
12753  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 614, __pyx_L1_error)
12754  __Pyx_GOTREF(__pyx_t_3);
12755  __Pyx_GIVEREF(__pyx_t_1);
12756  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
12757  __Pyx_GIVEREF(__pyx_t_2);
12758  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
12759  __pyx_t_1 = 0;
12760  __pyx_t_2 = 0;
12761  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __pyx_L1_error)
12762  __Pyx_GOTREF(__pyx_t_2);
12763  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12764  __pyx_r = __pyx_t_2;
12765  __pyx_t_2 = 0;
12766  goto __pyx_L0;
12767 
12768  /* "View.MemoryView":613
12769  * return 0
12770  *
12771  * def __repr__(self): # <<<<<<<<<<<<<<
12772  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
12773  * id(self))
12774  */
12775 
12776  /* function exit code */
12777  __pyx_L1_error:;
12778  __Pyx_XDECREF(__pyx_t_1);
12779  __Pyx_XDECREF(__pyx_t_2);
12780  __Pyx_XDECREF(__pyx_t_3);
12781  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12782  __pyx_r = NULL;
12783  __pyx_L0:;
12784  __Pyx_XGIVEREF(__pyx_r);
12785  __Pyx_TraceReturn(__pyx_r, 0);
12786  __Pyx_RefNannyFinishContext();
12787  return __pyx_r;
12788 }
12789 
12790 /* "View.MemoryView":617
12791  * id(self))
12792  *
12793  * def __str__(self): # <<<<<<<<<<<<<<
12794  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
12795  *
12796  */
12797 
12798 /* Python wrapper */
12799 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
12800 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
12801  PyObject *__pyx_r = 0;
12802  __Pyx_RefNannyDeclarations
12803  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
12804  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12805 
12806  /* function exit code */
12807  __Pyx_RefNannyFinishContext();
12808  return __pyx_r;
12809 }
12810 
12811 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
12812  PyObject *__pyx_r = NULL;
12813  __Pyx_TraceDeclarations
12814  __Pyx_RefNannyDeclarations
12815  PyObject *__pyx_t_1 = NULL;
12816  PyObject *__pyx_t_2 = NULL;
12817  int __pyx_lineno = 0;
12818  const char *__pyx_filename = NULL;
12819  int __pyx_clineno = 0;
12820  __Pyx_RefNannySetupContext("__str__", 0);
12821  __Pyx_TraceCall("__str__", __pyx_f[1], 617, 0, __PYX_ERR(1, 617, __pyx_L1_error));
12822 
12823  /* "View.MemoryView":618
12824  *
12825  * def __str__(self):
12826  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
12827  *
12828  *
12829  */
12830  __Pyx_TraceLine(618,0,__PYX_ERR(1, 618, __pyx_L1_error))
12831  __Pyx_XDECREF(__pyx_r);
12832  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
12833  __Pyx_GOTREF(__pyx_t_1);
12834  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
12835  __Pyx_GOTREF(__pyx_t_2);
12836  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12837  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
12838  __Pyx_GOTREF(__pyx_t_1);
12839  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12840  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
12841  __Pyx_GOTREF(__pyx_t_2);
12842  __Pyx_GIVEREF(__pyx_t_1);
12843  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
12844  __pyx_t_1 = 0;
12845  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
12846  __Pyx_GOTREF(__pyx_t_1);
12847  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12848  __pyx_r = __pyx_t_1;
12849  __pyx_t_1 = 0;
12850  goto __pyx_L0;
12851 
12852  /* "View.MemoryView":617
12853  * id(self))
12854  *
12855  * def __str__(self): # <<<<<<<<<<<<<<
12856  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
12857  *
12858  */
12859 
12860  /* function exit code */
12861  __pyx_L1_error:;
12862  __Pyx_XDECREF(__pyx_t_1);
12863  __Pyx_XDECREF(__pyx_t_2);
12864  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12865  __pyx_r = NULL;
12866  __pyx_L0:;
12867  __Pyx_XGIVEREF(__pyx_r);
12868  __Pyx_TraceReturn(__pyx_r, 0);
12869  __Pyx_RefNannyFinishContext();
12870  return __pyx_r;
12871 }
12872 
12873 /* "View.MemoryView":621
12874  *
12875  *
12876  * def is_c_contig(self): # <<<<<<<<<<<<<<
12877  * cdef __Pyx_memviewslice *mslice
12878  * cdef __Pyx_memviewslice tmp
12879  */
12880 
12881 /* Python wrapper */
12882 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12883 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_17is_c_contig = {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0};
12884 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12885  PyObject *__pyx_r = 0;
12886  __Pyx_RefNannyDeclarations
12887  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
12888  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
12889 
12890  /* function exit code */
12891  __Pyx_RefNannyFinishContext();
12892  return __pyx_r;
12893 }
12894 
12895 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
12896  __Pyx_memviewslice *__pyx_v_mslice;
12897  __Pyx_memviewslice __pyx_v_tmp;
12898  PyObject *__pyx_r = NULL;
12899  __Pyx_TraceDeclarations
12900  __Pyx_RefNannyDeclarations
12901  __Pyx_memviewslice *__pyx_t_1;
12902  PyObject *__pyx_t_2 = NULL;
12903  int __pyx_lineno = 0;
12904  const char *__pyx_filename = NULL;
12905  int __pyx_clineno = 0;
12906  __Pyx_RefNannySetupContext("is_c_contig", 0);
12907  __Pyx_TraceCall("is_c_contig", __pyx_f[1], 621, 0, __PYX_ERR(1, 621, __pyx_L1_error));
12908 
12909  /* "View.MemoryView":624
12910  * cdef __Pyx_memviewslice *mslice
12911  * cdef __Pyx_memviewslice tmp
12912  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
12913  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
12914  *
12915  */
12916  __Pyx_TraceLine(624,0,__PYX_ERR(1, 624, __pyx_L1_error))
12917  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 624, __pyx_L1_error)
12918  __pyx_v_mslice = __pyx_t_1;
12919 
12920  /* "View.MemoryView":625
12921  * cdef __Pyx_memviewslice tmp
12922  * mslice = get_slice_from_memview(self, &tmp)
12923  * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
12924  *
12925  * def is_f_contig(self):
12926  */
12927  __Pyx_TraceLine(625,0,__PYX_ERR(1, 625, __pyx_L1_error))
12928  __Pyx_XDECREF(__pyx_r);
12929  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 625, __pyx_L1_error)
12930  __Pyx_GOTREF(__pyx_t_2);
12931  __pyx_r = __pyx_t_2;
12932  __pyx_t_2 = 0;
12933  goto __pyx_L0;
12934 
12935  /* "View.MemoryView":621
12936  *
12937  *
12938  * def is_c_contig(self): # <<<<<<<<<<<<<<
12939  * cdef __Pyx_memviewslice *mslice
12940  * cdef __Pyx_memviewslice tmp
12941  */
12942 
12943  /* function exit code */
12944  __pyx_L1_error:;
12945  __Pyx_XDECREF(__pyx_t_2);
12946  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
12947  __pyx_r = NULL;
12948  __pyx_L0:;
12949  __Pyx_XGIVEREF(__pyx_r);
12950  __Pyx_TraceReturn(__pyx_r, 0);
12951  __Pyx_RefNannyFinishContext();
12952  return __pyx_r;
12953 }
12954 
12955 /* "View.MemoryView":627
12956  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
12957  *
12958  * def is_f_contig(self): # <<<<<<<<<<<<<<
12959  * cdef __Pyx_memviewslice *mslice
12960  * cdef __Pyx_memviewslice tmp
12961  */
12962 
12963 /* Python wrapper */
12964 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12965 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_19is_f_contig = {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0};
12966 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12967  PyObject *__pyx_r = 0;
12968  __Pyx_RefNannyDeclarations
12969  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
12970  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
12971 
12972  /* function exit code */
12973  __Pyx_RefNannyFinishContext();
12974  return __pyx_r;
12975 }
12976 
12977 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
12978  __Pyx_memviewslice *__pyx_v_mslice;
12979  __Pyx_memviewslice __pyx_v_tmp;
12980  PyObject *__pyx_r = NULL;
12981  __Pyx_TraceDeclarations
12982  __Pyx_RefNannyDeclarations
12983  __Pyx_memviewslice *__pyx_t_1;
12984  PyObject *__pyx_t_2 = NULL;
12985  int __pyx_lineno = 0;
12986  const char *__pyx_filename = NULL;
12987  int __pyx_clineno = 0;
12988  __Pyx_RefNannySetupContext("is_f_contig", 0);
12989  __Pyx_TraceCall("is_f_contig", __pyx_f[1], 627, 0, __PYX_ERR(1, 627, __pyx_L1_error));
12990 
12991  /* "View.MemoryView":630
12992  * cdef __Pyx_memviewslice *mslice
12993  * cdef __Pyx_memviewslice tmp
12994  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
12995  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
12996  *
12997  */
12998  __Pyx_TraceLine(630,0,__PYX_ERR(1, 630, __pyx_L1_error))
12999  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 630, __pyx_L1_error)
13000  __pyx_v_mslice = __pyx_t_1;
13001 
13002  /* "View.MemoryView":631
13003  * cdef __Pyx_memviewslice tmp
13004  * mslice = get_slice_from_memview(self, &tmp)
13005  * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
13006  *
13007  * def copy(self):
13008  */
13009  __Pyx_TraceLine(631,0,__PYX_ERR(1, 631, __pyx_L1_error))
13010  __Pyx_XDECREF(__pyx_r);
13011  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 631, __pyx_L1_error)
13012  __Pyx_GOTREF(__pyx_t_2);
13013  __pyx_r = __pyx_t_2;
13014  __pyx_t_2 = 0;
13015  goto __pyx_L0;
13016 
13017  /* "View.MemoryView":627
13018  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
13019  *
13020  * def is_f_contig(self): # <<<<<<<<<<<<<<
13021  * cdef __Pyx_memviewslice *mslice
13022  * cdef __Pyx_memviewslice tmp
13023  */
13024 
13025  /* function exit code */
13026  __pyx_L1_error:;
13027  __Pyx_XDECREF(__pyx_t_2);
13028  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
13029  __pyx_r = NULL;
13030  __pyx_L0:;
13031  __Pyx_XGIVEREF(__pyx_r);
13032  __Pyx_TraceReturn(__pyx_r, 0);
13033  __Pyx_RefNannyFinishContext();
13034  return __pyx_r;
13035 }
13036 
13037 /* "View.MemoryView":633
13038  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
13039  *
13040  * def copy(self): # <<<<<<<<<<<<<<
13041  * cdef __Pyx_memviewslice mslice
13042  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
13043  */
13044 
13045 /* Python wrapper */
13046 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13047 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_21copy = {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0};
13048 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13049  PyObject *__pyx_r = 0;
13050  __Pyx_RefNannyDeclarations
13051  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
13052  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
13053 
13054  /* function exit code */
13055  __Pyx_RefNannyFinishContext();
13056  return __pyx_r;
13057 }
13058 
13059 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
13060  __Pyx_memviewslice __pyx_v_mslice;
13061  int __pyx_v_flags;
13062  PyObject *__pyx_r = NULL;
13063  __Pyx_TraceDeclarations
13064  __Pyx_RefNannyDeclarations
13065  __Pyx_memviewslice __pyx_t_1;
13066  PyObject *__pyx_t_2 = NULL;
13067  int __pyx_lineno = 0;
13068  const char *__pyx_filename = NULL;
13069  int __pyx_clineno = 0;
13070  __Pyx_RefNannySetupContext("copy", 0);
13071  __Pyx_TraceCall("copy", __pyx_f[1], 633, 0, __PYX_ERR(1, 633, __pyx_L1_error));
13072 
13073  /* "View.MemoryView":635
13074  * def copy(self):
13075  * cdef __Pyx_memviewslice mslice
13076  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
13077  *
13078  * slice_copy(self, &mslice)
13079  */
13080  __Pyx_TraceLine(635,0,__PYX_ERR(1, 635, __pyx_L1_error))
13081  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
13082 
13083  /* "View.MemoryView":637
13084  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
13085  *
13086  * slice_copy(self, &mslice) # <<<<<<<<<<<<<<
13087  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
13088  * self.view.itemsize,
13089  */
13090  __Pyx_TraceLine(637,0,__PYX_ERR(1, 637, __pyx_L1_error))
13091  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
13092 
13093  /* "View.MemoryView":638
13094  *
13095  * slice_copy(self, &mslice)
13096  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
13097  * self.view.itemsize,
13098  * flags|PyBUF_C_CONTIGUOUS,
13099  */
13100  __Pyx_TraceLine(638,0,__PYX_ERR(1, 638, __pyx_L1_error))
13101  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 638, __pyx_L1_error)
13102  __pyx_v_mslice = __pyx_t_1;
13103 
13104  /* "View.MemoryView":643
13105  * self.dtype_is_object)
13106  *
13107  * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
13108  *
13109  * def copy_fortran(self):
13110  */
13111  __Pyx_TraceLine(643,0,__PYX_ERR(1, 643, __pyx_L1_error))
13112  __Pyx_XDECREF(__pyx_r);
13113  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 643, __pyx_L1_error)
13114  __Pyx_GOTREF(__pyx_t_2);
13115  __pyx_r = __pyx_t_2;
13116  __pyx_t_2 = 0;
13117  goto __pyx_L0;
13118 
13119  /* "View.MemoryView":633
13120  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
13121  *
13122  * def copy(self): # <<<<<<<<<<<<<<
13123  * cdef __Pyx_memviewslice mslice
13124  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
13125  */
13126 
13127  /* function exit code */
13128  __pyx_L1_error:;
13129  __Pyx_XDECREF(__pyx_t_2);
13130  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
13131  __pyx_r = NULL;
13132  __pyx_L0:;
13133  __Pyx_XGIVEREF(__pyx_r);
13134  __Pyx_TraceReturn(__pyx_r, 0);
13135  __Pyx_RefNannyFinishContext();
13136  return __pyx_r;
13137 }
13138 
13139 /* "View.MemoryView":645
13140  * return memoryview_copy_from_slice(self, &mslice)
13141  *
13142  * def copy_fortran(self): # <<<<<<<<<<<<<<
13143  * cdef __Pyx_memviewslice src, dst
13144  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
13145  */
13146 
13147 /* Python wrapper */
13148 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13149 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_23copy_fortran = {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0};
13150 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13151  PyObject *__pyx_r = 0;
13152  __Pyx_RefNannyDeclarations
13153  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
13154  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
13155 
13156  /* function exit code */
13157  __Pyx_RefNannyFinishContext();
13158  return __pyx_r;
13159 }
13160 
13161 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
13162  __Pyx_memviewslice __pyx_v_src;
13163  __Pyx_memviewslice __pyx_v_dst;
13164  int __pyx_v_flags;
13165  PyObject *__pyx_r = NULL;
13166  __Pyx_TraceDeclarations
13167  __Pyx_RefNannyDeclarations
13168  __Pyx_memviewslice __pyx_t_1;
13169  PyObject *__pyx_t_2 = NULL;
13170  int __pyx_lineno = 0;
13171  const char *__pyx_filename = NULL;
13172  int __pyx_clineno = 0;
13173  __Pyx_RefNannySetupContext("copy_fortran", 0);
13174  __Pyx_TraceCall("copy_fortran", __pyx_f[1], 645, 0, __PYX_ERR(1, 645, __pyx_L1_error));
13175 
13176  /* "View.MemoryView":647
13177  * def copy_fortran(self):
13178  * cdef __Pyx_memviewslice src, dst
13179  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
13180  *
13181  * slice_copy(self, &src)
13182  */
13183  __Pyx_TraceLine(647,0,__PYX_ERR(1, 647, __pyx_L1_error))
13184  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
13185 
13186  /* "View.MemoryView":649
13187  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
13188  *
13189  * slice_copy(self, &src) # <<<<<<<<<<<<<<
13190  * dst = slice_copy_contig(&src, "fortran", self.view.ndim,
13191  * self.view.itemsize,
13192  */
13193  __Pyx_TraceLine(649,0,__PYX_ERR(1, 649, __pyx_L1_error))
13194  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
13195 
13196  /* "View.MemoryView":650
13197  *
13198  * slice_copy(self, &src)
13199  * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
13200  * self.view.itemsize,
13201  * flags|PyBUF_F_CONTIGUOUS,
13202  */
13203  __Pyx_TraceLine(650,0,__PYX_ERR(1, 650, __pyx_L1_error))
13204  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 650, __pyx_L1_error)
13205  __pyx_v_dst = __pyx_t_1;
13206 
13207  /* "View.MemoryView":655
13208  * self.dtype_is_object)
13209  *
13210  * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
13211  *
13212  *
13213  */
13214  __Pyx_TraceLine(655,0,__PYX_ERR(1, 655, __pyx_L1_error))
13215  __Pyx_XDECREF(__pyx_r);
13216  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 655, __pyx_L1_error)
13217  __Pyx_GOTREF(__pyx_t_2);
13218  __pyx_r = __pyx_t_2;
13219  __pyx_t_2 = 0;
13220  goto __pyx_L0;
13221 
13222  /* "View.MemoryView":645
13223  * return memoryview_copy_from_slice(self, &mslice)
13224  *
13225  * def copy_fortran(self): # <<<<<<<<<<<<<<
13226  * cdef __Pyx_memviewslice src, dst
13227  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
13228  */
13229 
13230  /* function exit code */
13231  __pyx_L1_error:;
13232  __Pyx_XDECREF(__pyx_t_2);
13233  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
13234  __pyx_r = NULL;
13235  __pyx_L0:;
13236  __Pyx_XGIVEREF(__pyx_r);
13237  __Pyx_TraceReturn(__pyx_r, 0);
13238  __Pyx_RefNannyFinishContext();
13239  return __pyx_r;
13240 }
13241 
13242 /* "(tree fragment)":1
13243  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
13244  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13245  * def __setstate_cython__(self, __pyx_state):
13246  */
13247 
13248 /* Python wrapper */
13249 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13250 static PyMethodDef __pyx_mdef___pyx_memoryview_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0};
13251 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13252  PyObject *__pyx_r = 0;
13253  __Pyx_RefNannyDeclarations
13254  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
13255  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
13256 
13257  /* function exit code */
13258  __Pyx_RefNannyFinishContext();
13259  return __pyx_r;
13260 }
13261 
13262 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
13263  PyObject *__pyx_r = NULL;
13264  __Pyx_TraceDeclarations
13265  __Pyx_RefNannyDeclarations
13266  PyObject *__pyx_t_1 = NULL;
13267  int __pyx_lineno = 0;
13268  const char *__pyx_filename = NULL;
13269  int __pyx_clineno = 0;
13270  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
13271  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
13272 
13273  /* "(tree fragment)":2
13274  * def __reduce_cython__(self):
13275  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
13276  * def __setstate_cython__(self, __pyx_state):
13277  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13278  */
13279  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
13280  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
13281  __Pyx_GOTREF(__pyx_t_1);
13282  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
13283  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13284  __PYX_ERR(1, 2, __pyx_L1_error)
13285 
13286  /* "(tree fragment)":1
13287  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
13288  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13289  * def __setstate_cython__(self, __pyx_state):
13290  */
13291 
13292  /* function exit code */
13293  __pyx_L1_error:;
13294  __Pyx_XDECREF(__pyx_t_1);
13295  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13296  __pyx_r = NULL;
13297  __Pyx_XGIVEREF(__pyx_r);
13298  __Pyx_TraceReturn(__pyx_r, 0);
13299  __Pyx_RefNannyFinishContext();
13300  return __pyx_r;
13301 }
13302 
13303 /* "(tree fragment)":3
13304  * def __reduce_cython__(self):
13305  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13306  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
13307  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13308  */
13309 
13310 /* Python wrapper */
13311 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
13312 static PyMethodDef __pyx_mdef___pyx_memoryview_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0};
13313 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
13314  PyObject *__pyx_r = 0;
13315  __Pyx_RefNannyDeclarations
13316  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
13317  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
13318 
13319  /* function exit code */
13320  __Pyx_RefNannyFinishContext();
13321  return __pyx_r;
13322 }
13323 
13324 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
13325  PyObject *__pyx_r = NULL;
13326  __Pyx_TraceDeclarations
13327  __Pyx_RefNannyDeclarations
13328  PyObject *__pyx_t_1 = NULL;
13329  int __pyx_lineno = 0;
13330  const char *__pyx_filename = NULL;
13331  int __pyx_clineno = 0;
13332  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
13333  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
13334 
13335  /* "(tree fragment)":4
13336  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13337  * def __setstate_cython__(self, __pyx_state):
13338  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
13339  */
13340  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
13341  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
13342  __Pyx_GOTREF(__pyx_t_1);
13343  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
13344  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13345  __PYX_ERR(1, 4, __pyx_L1_error)
13346 
13347  /* "(tree fragment)":3
13348  * def __reduce_cython__(self):
13349  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13350  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
13351  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13352  */
13353 
13354  /* function exit code */
13355  __pyx_L1_error:;
13356  __Pyx_XDECREF(__pyx_t_1);
13357  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13358  __pyx_r = NULL;
13359  __Pyx_XGIVEREF(__pyx_r);
13360  __Pyx_TraceReturn(__pyx_r, 0);
13361  __Pyx_RefNannyFinishContext();
13362  return __pyx_r;
13363 }
13364 
13365 /* "View.MemoryView":659
13366  *
13367  * @cname('__pyx_memoryview_new')
13368  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
13369  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13370  * result.typeinfo = typeinfo
13371  */
13372 
13373 static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
13374  struct __pyx_memoryview_obj *__pyx_v_result = 0;
13375  PyObject *__pyx_r = NULL;
13376  __Pyx_TraceDeclarations
13377  __Pyx_RefNannyDeclarations
13378  PyObject *__pyx_t_1 = NULL;
13379  PyObject *__pyx_t_2 = NULL;
13380  PyObject *__pyx_t_3 = NULL;
13381  int __pyx_lineno = 0;
13382  const char *__pyx_filename = NULL;
13383  int __pyx_clineno = 0;
13384  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
13385  __Pyx_TraceCall("memoryview_cwrapper", __pyx_f[1], 659, 0, __PYX_ERR(1, 659, __pyx_L1_error));
13386 
13387  /* "View.MemoryView":660
13388  * @cname('__pyx_memoryview_new')
13389  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
13390  * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
13391  * result.typeinfo = typeinfo
13392  * return result
13393  */
13394  __Pyx_TraceLine(660,0,__PYX_ERR(1, 660, __pyx_L1_error))
13395  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 660, __pyx_L1_error)
13396  __Pyx_GOTREF(__pyx_t_1);
13397  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 660, __pyx_L1_error)
13398  __Pyx_GOTREF(__pyx_t_2);
13399  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 660, __pyx_L1_error)
13400  __Pyx_GOTREF(__pyx_t_3);
13401  __Pyx_INCREF(__pyx_v_o);
13402  __Pyx_GIVEREF(__pyx_v_o);
13403  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
13404  __Pyx_GIVEREF(__pyx_t_1);
13405  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
13406  __Pyx_GIVEREF(__pyx_t_2);
13407  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
13408  __pyx_t_1 = 0;
13409  __pyx_t_2 = 0;
13410  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 660, __pyx_L1_error)
13411  __Pyx_GOTREF(__pyx_t_2);
13412  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13413  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
13414  __pyx_t_2 = 0;
13415 
13416  /* "View.MemoryView":661
13417  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
13418  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13419  * result.typeinfo = typeinfo # <<<<<<<<<<<<<<
13420  * return result
13421  *
13422  */
13423  __Pyx_TraceLine(661,0,__PYX_ERR(1, 661, __pyx_L1_error))
13424  __pyx_v_result->typeinfo = __pyx_v_typeinfo;
13425 
13426  /* "View.MemoryView":662
13427  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13428  * result.typeinfo = typeinfo
13429  * return result # <<<<<<<<<<<<<<
13430  *
13431  * @cname('__pyx_memoryview_check')
13432  */
13433  __Pyx_TraceLine(662,0,__PYX_ERR(1, 662, __pyx_L1_error))
13434  __Pyx_XDECREF(__pyx_r);
13435  __Pyx_INCREF(((PyObject *)__pyx_v_result));
13436  __pyx_r = ((PyObject *)__pyx_v_result);
13437  goto __pyx_L0;
13438 
13439  /* "View.MemoryView":659
13440  *
13441  * @cname('__pyx_memoryview_new')
13442  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
13443  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13444  * result.typeinfo = typeinfo
13445  */
13446 
13447  /* function exit code */
13448  __pyx_L1_error:;
13449  __Pyx_XDECREF(__pyx_t_1);
13450  __Pyx_XDECREF(__pyx_t_2);
13451  __Pyx_XDECREF(__pyx_t_3);
13452  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
13453  __pyx_r = 0;
13454  __pyx_L0:;
13455  __Pyx_XDECREF((PyObject *)__pyx_v_result);
13456  __Pyx_XGIVEREF(__pyx_r);
13457  __Pyx_TraceReturn(__pyx_r, 0);
13458  __Pyx_RefNannyFinishContext();
13459  return __pyx_r;
13460 }
13461 
13462 /* "View.MemoryView":665
13463  *
13464  * @cname('__pyx_memoryview_check')
13465  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
13466  * return isinstance(o, memoryview)
13467  *
13468  */
13469 
13470 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
13471  int __pyx_r;
13472  __Pyx_TraceDeclarations
13473  __Pyx_RefNannyDeclarations
13474  int __pyx_t_1;
13475  int __pyx_lineno = 0;
13476  const char *__pyx_filename = NULL;
13477  int __pyx_clineno = 0;
13478  __Pyx_RefNannySetupContext("memoryview_check", 0);
13479  __Pyx_TraceCall("memoryview_check", __pyx_f[1], 665, 0, __PYX_ERR(1, 665, __pyx_L1_error));
13480 
13481  /* "View.MemoryView":666
13482  * @cname('__pyx_memoryview_check')
13483  * cdef inline bint memoryview_check(object o):
13484  * return isinstance(o, memoryview) # <<<<<<<<<<<<<<
13485  *
13486  * cdef tuple _unellipsify(object index, int ndim):
13487  */
13488  __Pyx_TraceLine(666,0,__PYX_ERR(1, 666, __pyx_L1_error))
13489  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
13490  __pyx_r = __pyx_t_1;
13491  goto __pyx_L0;
13492 
13493  /* "View.MemoryView":665
13494  *
13495  * @cname('__pyx_memoryview_check')
13496  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
13497  * return isinstance(o, memoryview)
13498  *
13499  */
13500 
13501  /* function exit code */
13502  __pyx_L1_error:;
13503  __Pyx_WriteUnraisable("View.MemoryView.memoryview_check", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
13504  __pyx_r = 0;
13505  __pyx_L0:;
13506  __Pyx_TraceReturn(Py_None, 0);
13507  __Pyx_RefNannyFinishContext();
13508  return __pyx_r;
13509 }
13510 
13511 /* "View.MemoryView":668
13512  * return isinstance(o, memoryview)
13513  *
13514  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
13515  * """
13516  * Replace all ellipses with full slices and fill incomplete indices with
13517  */
13518 
13519 static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
13520  PyObject *__pyx_v_tup = NULL;
13521  PyObject *__pyx_v_result = NULL;
13522  int __pyx_v_have_slices;
13523  int __pyx_v_seen_ellipsis;
13524  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
13525  PyObject *__pyx_v_item = NULL;
13526  Py_ssize_t __pyx_v_nslices;
13527  PyObject *__pyx_r = NULL;
13528  __Pyx_TraceDeclarations
13529  __Pyx_RefNannyDeclarations
13530  int __pyx_t_1;
13531  int __pyx_t_2;
13532  PyObject *__pyx_t_3 = NULL;
13533  PyObject *__pyx_t_4 = NULL;
13534  Py_ssize_t __pyx_t_5;
13535  PyObject *(*__pyx_t_6)(PyObject *);
13536  PyObject *__pyx_t_7 = NULL;
13537  Py_ssize_t __pyx_t_8;
13538  int __pyx_t_9;
13539  int __pyx_t_10;
13540  PyObject *__pyx_t_11 = NULL;
13541  int __pyx_lineno = 0;
13542  const char *__pyx_filename = NULL;
13543  int __pyx_clineno = 0;
13544  __Pyx_RefNannySetupContext("_unellipsify", 0);
13545  __Pyx_TraceCall("_unellipsify", __pyx_f[1], 668, 0, __PYX_ERR(1, 668, __pyx_L1_error));
13546 
13547  /* "View.MemoryView":673
13548  * full slices.
13549  * """
13550  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
13551  * tup = (index,)
13552  * else:
13553  */
13554  __Pyx_TraceLine(673,0,__PYX_ERR(1, 673, __pyx_L1_error))
13555  __pyx_t_1 = PyTuple_Check(__pyx_v_index);
13556  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
13557  if (__pyx_t_2) {
13558 
13559  /* "View.MemoryView":674
13560  * """
13561  * if not isinstance(index, tuple):
13562  * tup = (index,) # <<<<<<<<<<<<<<
13563  * else:
13564  * tup = index
13565  */
13566  __Pyx_TraceLine(674,0,__PYX_ERR(1, 674, __pyx_L1_error))
13567  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 674, __pyx_L1_error)
13568  __Pyx_GOTREF(__pyx_t_3);
13569  __Pyx_INCREF(__pyx_v_index);
13570  __Pyx_GIVEREF(__pyx_v_index);
13571  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
13572  __pyx_v_tup = __pyx_t_3;
13573  __pyx_t_3 = 0;
13574 
13575  /* "View.MemoryView":673
13576  * full slices.
13577  * """
13578  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
13579  * tup = (index,)
13580  * else:
13581  */
13582  goto __pyx_L3;
13583  }
13584 
13585  /* "View.MemoryView":676
13586  * tup = (index,)
13587  * else:
13588  * tup = index # <<<<<<<<<<<<<<
13589  *
13590  * result = []
13591  */
13592  __Pyx_TraceLine(676,0,__PYX_ERR(1, 676, __pyx_L1_error))
13593  /*else*/ {
13594  __Pyx_INCREF(__pyx_v_index);
13595  __pyx_v_tup = __pyx_v_index;
13596  }
13597  __pyx_L3:;
13598 
13599  /* "View.MemoryView":678
13600  * tup = index
13601  *
13602  * result = [] # <<<<<<<<<<<<<<
13603  * have_slices = False
13604  * seen_ellipsis = False
13605  */
13606  __Pyx_TraceLine(678,0,__PYX_ERR(1, 678, __pyx_L1_error))
13607  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 678, __pyx_L1_error)
13608  __Pyx_GOTREF(__pyx_t_3);
13609  __pyx_v_result = ((PyObject*)__pyx_t_3);
13610  __pyx_t_3 = 0;
13611 
13612  /* "View.MemoryView":679
13613  *
13614  * result = []
13615  * have_slices = False # <<<<<<<<<<<<<<
13616  * seen_ellipsis = False
13617  * for idx, item in enumerate(tup):
13618  */
13619  __Pyx_TraceLine(679,0,__PYX_ERR(1, 679, __pyx_L1_error))
13620  __pyx_v_have_slices = 0;
13621 
13622  /* "View.MemoryView":680
13623  * result = []
13624  * have_slices = False
13625  * seen_ellipsis = False # <<<<<<<<<<<<<<
13626  * for idx, item in enumerate(tup):
13627  * if item is Ellipsis:
13628  */
13629  __Pyx_TraceLine(680,0,__PYX_ERR(1, 680, __pyx_L1_error))
13630  __pyx_v_seen_ellipsis = 0;
13631 
13632  /* "View.MemoryView":681
13633  * have_slices = False
13634  * seen_ellipsis = False
13635  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
13636  * if item is Ellipsis:
13637  * if not seen_ellipsis:
13638  */
13639  __Pyx_TraceLine(681,0,__PYX_ERR(1, 681, __pyx_L1_error))
13640  __Pyx_INCREF(__pyx_int_0);
13641  __pyx_t_3 = __pyx_int_0;
13642  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
13643  __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
13644  __pyx_t_6 = NULL;
13645  } else {
13646  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 681, __pyx_L1_error)
13647  __Pyx_GOTREF(__pyx_t_4);
13648  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 681, __pyx_L1_error)
13649  }
13650  for (;;) {
13651  if (likely(!__pyx_t_6)) {
13652  if (likely(PyList_CheckExact(__pyx_t_4))) {
13653  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
13654  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13655  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 681, __pyx_L1_error)
13656  #else
13657  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error)
13658  __Pyx_GOTREF(__pyx_t_7);
13659  #endif
13660  } else {
13661  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
13662  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13663  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 681, __pyx_L1_error)
13664  #else
13665  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error)
13666  __Pyx_GOTREF(__pyx_t_7);
13667  #endif
13668  }
13669  } else {
13670  __pyx_t_7 = __pyx_t_6(__pyx_t_4);
13671  if (unlikely(!__pyx_t_7)) {
13672  PyObject* exc_type = PyErr_Occurred();
13673  if (exc_type) {
13674  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13675  else __PYX_ERR(1, 681, __pyx_L1_error)
13676  }
13677  break;
13678  }
13679  __Pyx_GOTREF(__pyx_t_7);
13680  }
13681  __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
13682  __pyx_t_7 = 0;
13683  __Pyx_INCREF(__pyx_t_3);
13684  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
13685  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error)
13686  __Pyx_GOTREF(__pyx_t_7);
13687  __Pyx_DECREF(__pyx_t_3);
13688  __pyx_t_3 = __pyx_t_7;
13689  __pyx_t_7 = 0;
13690 
13691  /* "View.MemoryView":682
13692  * seen_ellipsis = False
13693  * for idx, item in enumerate(tup):
13694  * if item is Ellipsis: # <<<<<<<<<<<<<<
13695  * if not seen_ellipsis:
13696  * result.extend([slice(None)] * (ndim - len(tup) + 1))
13697  */
13698  __Pyx_TraceLine(682,0,__PYX_ERR(1, 682, __pyx_L1_error))
13699  __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
13700  __pyx_t_1 = (__pyx_t_2 != 0);
13701  if (__pyx_t_1) {
13702 
13703  /* "View.MemoryView":683
13704  * for idx, item in enumerate(tup):
13705  * if item is Ellipsis:
13706  * if not seen_ellipsis: # <<<<<<<<<<<<<<
13707  * result.extend([slice(None)] * (ndim - len(tup) + 1))
13708  * seen_ellipsis = True
13709  */
13710  __Pyx_TraceLine(683,0,__PYX_ERR(1, 683, __pyx_L1_error))
13711  __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
13712  if (__pyx_t_1) {
13713 
13714  /* "View.MemoryView":684
13715  * if item is Ellipsis:
13716  * if not seen_ellipsis:
13717  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
13718  * seen_ellipsis = True
13719  * else:
13720  */
13721  __Pyx_TraceLine(684,0,__PYX_ERR(1, 684, __pyx_L1_error))
13722  __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 684, __pyx_L1_error)
13723  __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 684, __pyx_L1_error)
13724  __Pyx_GOTREF(__pyx_t_7);
13725  { Py_ssize_t __pyx_temp;
13726  for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
13727  __Pyx_INCREF(__pyx_slice__32);
13728  __Pyx_GIVEREF(__pyx_slice__32);
13729  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__32);
13730  }
13731  }
13732  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 684, __pyx_L1_error)
13733  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13734 
13735  /* "View.MemoryView":685
13736  * if not seen_ellipsis:
13737  * result.extend([slice(None)] * (ndim - len(tup) + 1))
13738  * seen_ellipsis = True # <<<<<<<<<<<<<<
13739  * else:
13740  * result.append(slice(None))
13741  */
13742  __Pyx_TraceLine(685,0,__PYX_ERR(1, 685, __pyx_L1_error))
13743  __pyx_v_seen_ellipsis = 1;
13744 
13745  /* "View.MemoryView":683
13746  * for idx, item in enumerate(tup):
13747  * if item is Ellipsis:
13748  * if not seen_ellipsis: # <<<<<<<<<<<<<<
13749  * result.extend([slice(None)] * (ndim - len(tup) + 1))
13750  * seen_ellipsis = True
13751  */
13752  goto __pyx_L7;
13753  }
13754 
13755  /* "View.MemoryView":687
13756  * seen_ellipsis = True
13757  * else:
13758  * result.append(slice(None)) # <<<<<<<<<<<<<<
13759  * have_slices = True
13760  * else:
13761  */
13762  __Pyx_TraceLine(687,0,__PYX_ERR(1, 687, __pyx_L1_error))
13763  /*else*/ {
13764  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__32); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 687, __pyx_L1_error)
13765  }
13766  __pyx_L7:;
13767 
13768  /* "View.MemoryView":688
13769  * else:
13770  * result.append(slice(None))
13771  * have_slices = True # <<<<<<<<<<<<<<
13772  * else:
13773  * if not isinstance(item, slice) and not PyIndex_Check(item):
13774  */
13775  __Pyx_TraceLine(688,0,__PYX_ERR(1, 688, __pyx_L1_error))
13776  __pyx_v_have_slices = 1;
13777 
13778  /* "View.MemoryView":682
13779  * seen_ellipsis = False
13780  * for idx, item in enumerate(tup):
13781  * if item is Ellipsis: # <<<<<<<<<<<<<<
13782  * if not seen_ellipsis:
13783  * result.extend([slice(None)] * (ndim - len(tup) + 1))
13784  */
13785  goto __pyx_L6;
13786  }
13787 
13788  /* "View.MemoryView":690
13789  * have_slices = True
13790  * else:
13791  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
13792  * raise TypeError("Cannot index with type '%s'" % type(item))
13793  *
13794  */
13795  __Pyx_TraceLine(690,0,__PYX_ERR(1, 690, __pyx_L1_error))
13796  /*else*/ {
13797  __pyx_t_2 = PySlice_Check(__pyx_v_item);
13798  __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
13799  if (__pyx_t_10) {
13800  } else {
13801  __pyx_t_1 = __pyx_t_10;
13802  goto __pyx_L9_bool_binop_done;
13803  }
13804  __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
13805  __pyx_t_1 = __pyx_t_10;
13806  __pyx_L9_bool_binop_done:;
13807  if (unlikely(__pyx_t_1)) {
13808 
13809  /* "View.MemoryView":691
13810  * else:
13811  * if not isinstance(item, slice) and not PyIndex_Check(item):
13812  * raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<<
13813  *
13814  * have_slices = have_slices or isinstance(item, slice)
13815  */
13816  __Pyx_TraceLine(691,0,__PYX_ERR(1, 691, __pyx_L1_error))
13817  __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 691, __pyx_L1_error)
13818  __Pyx_GOTREF(__pyx_t_7);
13819  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 691, __pyx_L1_error)
13820  __Pyx_GOTREF(__pyx_t_11);
13821  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13822  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
13823  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13824  __PYX_ERR(1, 691, __pyx_L1_error)
13825 
13826  /* "View.MemoryView":690
13827  * have_slices = True
13828  * else:
13829  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
13830  * raise TypeError("Cannot index with type '%s'" % type(item))
13831  *
13832  */
13833  }
13834 
13835  /* "View.MemoryView":693
13836  * raise TypeError("Cannot index with type '%s'" % type(item))
13837  *
13838  * have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<<
13839  * result.append(item)
13840  *
13841  */
13842  __Pyx_TraceLine(693,0,__PYX_ERR(1, 693, __pyx_L1_error))
13843  __pyx_t_10 = (__pyx_v_have_slices != 0);
13844  if (!__pyx_t_10) {
13845  } else {
13846  __pyx_t_1 = __pyx_t_10;
13847  goto __pyx_L11_bool_binop_done;
13848  }
13849  __pyx_t_10 = PySlice_Check(__pyx_v_item);
13850  __pyx_t_2 = (__pyx_t_10 != 0);
13851  __pyx_t_1 = __pyx_t_2;
13852  __pyx_L11_bool_binop_done:;
13853  __pyx_v_have_slices = __pyx_t_1;
13854 
13855  /* "View.MemoryView":694
13856  *
13857  * have_slices = have_slices or isinstance(item, slice)
13858  * result.append(item) # <<<<<<<<<<<<<<
13859  *
13860  * nslices = ndim - len(result)
13861  */
13862  __Pyx_TraceLine(694,0,__PYX_ERR(1, 694, __pyx_L1_error))
13863  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 694, __pyx_L1_error)
13864  }
13865  __pyx_L6:;
13866 
13867  /* "View.MemoryView":681
13868  * have_slices = False
13869  * seen_ellipsis = False
13870  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
13871  * if item is Ellipsis:
13872  * if not seen_ellipsis:
13873  */
13874  __Pyx_TraceLine(681,0,__PYX_ERR(1, 681, __pyx_L1_error))
13875  }
13876  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13877  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13878 
13879  /* "View.MemoryView":696
13880  * result.append(item)
13881  *
13882  * nslices = ndim - len(result) # <<<<<<<<<<<<<<
13883  * if nslices:
13884  * result.extend([slice(None)] * nslices)
13885  */
13886  __Pyx_TraceLine(696,0,__PYX_ERR(1, 696, __pyx_L1_error))
13887  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 696, __pyx_L1_error)
13888  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
13889 
13890  /* "View.MemoryView":697
13891  *
13892  * nslices = ndim - len(result)
13893  * if nslices: # <<<<<<<<<<<<<<
13894  * result.extend([slice(None)] * nslices)
13895  *
13896  */
13897  __Pyx_TraceLine(697,0,__PYX_ERR(1, 697, __pyx_L1_error))
13898  __pyx_t_1 = (__pyx_v_nslices != 0);
13899  if (__pyx_t_1) {
13900 
13901  /* "View.MemoryView":698
13902  * nslices = ndim - len(result)
13903  * if nslices:
13904  * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<<
13905  *
13906  * return have_slices or nslices, tuple(result)
13907  */
13908  __Pyx_TraceLine(698,0,__PYX_ERR(1, 698, __pyx_L1_error))
13909  __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error)
13910  __Pyx_GOTREF(__pyx_t_3);
13911  { Py_ssize_t __pyx_temp;
13912  for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
13913  __Pyx_INCREF(__pyx_slice__32);
13914  __Pyx_GIVEREF(__pyx_slice__32);
13915  PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__32);
13916  }
13917  }
13918  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 698, __pyx_L1_error)
13919  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13920 
13921  /* "View.MemoryView":697
13922  *
13923  * nslices = ndim - len(result)
13924  * if nslices: # <<<<<<<<<<<<<<
13925  * result.extend([slice(None)] * nslices)
13926  *
13927  */
13928  }
13929 
13930  /* "View.MemoryView":700
13931  * result.extend([slice(None)] * nslices)
13932  *
13933  * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<<
13934  *
13935  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
13936  */
13937  __Pyx_TraceLine(700,0,__PYX_ERR(1, 700, __pyx_L1_error))
13938  __Pyx_XDECREF(__pyx_r);
13939  if (!__pyx_v_have_slices) {
13940  } else {
13941  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error)
13942  __Pyx_GOTREF(__pyx_t_4);
13943  __pyx_t_3 = __pyx_t_4;
13944  __pyx_t_4 = 0;
13945  goto __pyx_L14_bool_binop_done;
13946  }
13947  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error)
13948  __Pyx_GOTREF(__pyx_t_4);
13949  __pyx_t_3 = __pyx_t_4;
13950  __pyx_t_4 = 0;
13951  __pyx_L14_bool_binop_done:;
13952  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error)
13953  __Pyx_GOTREF(__pyx_t_4);
13954  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 700, __pyx_L1_error)
13955  __Pyx_GOTREF(__pyx_t_11);
13956  __Pyx_GIVEREF(__pyx_t_3);
13957  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
13958  __Pyx_GIVEREF(__pyx_t_4);
13959  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
13960  __pyx_t_3 = 0;
13961  __pyx_t_4 = 0;
13962  __pyx_r = ((PyObject*)__pyx_t_11);
13963  __pyx_t_11 = 0;
13964  goto __pyx_L0;
13965 
13966  /* "View.MemoryView":668
13967  * return isinstance(o, memoryview)
13968  *
13969  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
13970  * """
13971  * Replace all ellipses with full slices and fill incomplete indices with
13972  */
13973 
13974  /* function exit code */
13975  __pyx_L1_error:;
13976  __Pyx_XDECREF(__pyx_t_3);
13977  __Pyx_XDECREF(__pyx_t_4);
13978  __Pyx_XDECREF(__pyx_t_7);
13979  __Pyx_XDECREF(__pyx_t_11);
13980  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
13981  __pyx_r = 0;
13982  __pyx_L0:;
13983  __Pyx_XDECREF(__pyx_v_tup);
13984  __Pyx_XDECREF(__pyx_v_result);
13985  __Pyx_XDECREF(__pyx_v_idx);
13986  __Pyx_XDECREF(__pyx_v_item);
13987  __Pyx_XGIVEREF(__pyx_r);
13988  __Pyx_TraceReturn(__pyx_r, 0);
13989  __Pyx_RefNannyFinishContext();
13990  return __pyx_r;
13991 }
13992 
13993 /* "View.MemoryView":702
13994  * return have_slices or nslices, tuple(result)
13995  *
13996  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
13997  * for suboffset in suboffsets[:ndim]:
13998  * if suboffset >= 0:
13999  */
14000 
14001 static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
14002  Py_ssize_t __pyx_v_suboffset;
14003  PyObject *__pyx_r = NULL;
14004  __Pyx_TraceDeclarations
14005  __Pyx_RefNannyDeclarations
14006  Py_ssize_t *__pyx_t_1;
14007  Py_ssize_t *__pyx_t_2;
14008  Py_ssize_t *__pyx_t_3;
14009  int __pyx_t_4;
14010  PyObject *__pyx_t_5 = NULL;
14011  int __pyx_lineno = 0;
14012  const char *__pyx_filename = NULL;
14013  int __pyx_clineno = 0;
14014  __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
14015  __Pyx_TraceCall("assert_direct_dimensions", __pyx_f[1], 702, 0, __PYX_ERR(1, 702, __pyx_L1_error));
14016 
14017  /* "View.MemoryView":703
14018  *
14019  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
14020  * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
14021  * if suboffset >= 0:
14022  * raise ValueError("Indirect dimensions not supported")
14023  */
14024  __Pyx_TraceLine(703,0,__PYX_ERR(1, 703, __pyx_L1_error))
14025  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
14026  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
14027  __pyx_t_1 = __pyx_t_3;
14028  __pyx_v_suboffset = (__pyx_t_1[0]);
14029 
14030  /* "View.MemoryView":704
14031  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
14032  * for suboffset in suboffsets[:ndim]:
14033  * if suboffset >= 0: # <<<<<<<<<<<<<<
14034  * raise ValueError("Indirect dimensions not supported")
14035  *
14036  */
14037  __Pyx_TraceLine(704,0,__PYX_ERR(1, 704, __pyx_L1_error))
14038  __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
14039  if (unlikely(__pyx_t_4)) {
14040 
14041  /* "View.MemoryView":705
14042  * for suboffset in suboffsets[:ndim]:
14043  * if suboffset >= 0:
14044  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
14045  *
14046  *
14047  */
14048  __Pyx_TraceLine(705,0,__PYX_ERR(1, 705, __pyx_L1_error))
14049  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 705, __pyx_L1_error)
14050  __Pyx_GOTREF(__pyx_t_5);
14051  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
14052  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14053  __PYX_ERR(1, 705, __pyx_L1_error)
14054 
14055  /* "View.MemoryView":704
14056  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
14057  * for suboffset in suboffsets[:ndim]:
14058  * if suboffset >= 0: # <<<<<<<<<<<<<<
14059  * raise ValueError("Indirect dimensions not supported")
14060  *
14061  */
14062  }
14063  }
14064 
14065  /* "View.MemoryView":702
14066  * return have_slices or nslices, tuple(result)
14067  *
14068  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
14069  * for suboffset in suboffsets[:ndim]:
14070  * if suboffset >= 0:
14071  */
14072 
14073  /* function exit code */
14074  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14075  goto __pyx_L0;
14076  __pyx_L1_error:;
14077  __Pyx_XDECREF(__pyx_t_5);
14078  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
14079  __pyx_r = 0;
14080  __pyx_L0:;
14081  __Pyx_XGIVEREF(__pyx_r);
14082  __Pyx_TraceReturn(__pyx_r, 0);
14083  __Pyx_RefNannyFinishContext();
14084  return __pyx_r;
14085 }
14086 
14087 /* "View.MemoryView":712
14088  *
14089  * @cname('__pyx_memview_slice')
14090  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
14091  * cdef int new_ndim = 0, suboffset_dim = -1, dim
14092  * cdef bint negative_step
14093  */
14094 
14095 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
14096  int __pyx_v_new_ndim;
14097  int __pyx_v_suboffset_dim;
14098  int __pyx_v_dim;
14099  __Pyx_memviewslice __pyx_v_src;
14100  __Pyx_memviewslice __pyx_v_dst;
14101  __Pyx_memviewslice *__pyx_v_p_src;
14102  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
14103  __Pyx_memviewslice *__pyx_v_p_dst;
14104  int *__pyx_v_p_suboffset_dim;
14105  Py_ssize_t __pyx_v_start;
14106  Py_ssize_t __pyx_v_stop;
14107  Py_ssize_t __pyx_v_step;
14108  int __pyx_v_have_start;
14109  int __pyx_v_have_stop;
14110  int __pyx_v_have_step;
14111  PyObject *__pyx_v_index = NULL;
14112  struct __pyx_memoryview_obj *__pyx_r = NULL;
14113  __Pyx_TraceDeclarations
14114  __Pyx_RefNannyDeclarations
14115  int __pyx_t_1;
14116  int __pyx_t_2;
14117  PyObject *__pyx_t_3 = NULL;
14118  struct __pyx_memoryview_obj *__pyx_t_4;
14119  char *__pyx_t_5;
14120  int __pyx_t_6;
14121  Py_ssize_t __pyx_t_7;
14122  PyObject *(*__pyx_t_8)(PyObject *);
14123  PyObject *__pyx_t_9 = NULL;
14124  Py_ssize_t __pyx_t_10;
14125  int __pyx_t_11;
14126  Py_ssize_t __pyx_t_12;
14127  int __pyx_lineno = 0;
14128  const char *__pyx_filename = NULL;
14129  int __pyx_clineno = 0;
14130  __Pyx_RefNannySetupContext("memview_slice", 0);
14131  __Pyx_TraceCall("memview_slice", __pyx_f[1], 712, 0, __PYX_ERR(1, 712, __pyx_L1_error));
14132 
14133  /* "View.MemoryView":713
14134  * @cname('__pyx_memview_slice')
14135  * cdef memoryview memview_slice(memoryview memview, object indices):
14136  * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
14137  * cdef bint negative_step
14138  * cdef __Pyx_memviewslice src, dst
14139  */
14140  __Pyx_TraceLine(713,0,__PYX_ERR(1, 713, __pyx_L1_error))
14141  __pyx_v_new_ndim = 0;
14142  __pyx_v_suboffset_dim = -1;
14143 
14144  /* "View.MemoryView":720
14145  *
14146  *
14147  * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
14148  *
14149  * cdef _memoryviewslice memviewsliceobj
14150  */
14151  __Pyx_TraceLine(720,0,__PYX_ERR(1, 720, __pyx_L1_error))
14152  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
14153 
14154  /* "View.MemoryView":724
14155  * cdef _memoryviewslice memviewsliceobj
14156  *
14157  * assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
14158  *
14159  * if isinstance(memview, _memoryviewslice):
14160  */
14161  __Pyx_TraceLine(724,0,__PYX_ERR(1, 724, __pyx_L1_error))
14162  #ifndef CYTHON_WITHOUT_ASSERTIONS
14163  if (unlikely(__pyx_assertions_enabled())) {
14164  if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
14165  PyErr_SetNone(PyExc_AssertionError);
14166  __PYX_ERR(1, 724, __pyx_L1_error)
14167  }
14168  }
14169  #endif
14170 
14171  /* "View.MemoryView":726
14172  * assert memview.view.ndim > 0
14173  *
14174  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14175  * memviewsliceobj = memview
14176  * p_src = &memviewsliceobj.from_slice
14177  */
14178  __Pyx_TraceLine(726,0,__PYX_ERR(1, 726, __pyx_L1_error))
14179  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
14180  __pyx_t_2 = (__pyx_t_1 != 0);
14181  if (__pyx_t_2) {
14182 
14183  /* "View.MemoryView":727
14184  *
14185  * if isinstance(memview, _memoryviewslice):
14186  * memviewsliceobj = memview # <<<<<<<<<<<<<<
14187  * p_src = &memviewsliceobj.from_slice
14188  * else:
14189  */
14190  __Pyx_TraceLine(727,0,__PYX_ERR(1, 727, __pyx_L1_error))
14191  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 727, __pyx_L1_error)
14192  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
14193  __Pyx_INCREF(__pyx_t_3);
14194  __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
14195  __pyx_t_3 = 0;
14196 
14197  /* "View.MemoryView":728
14198  * if isinstance(memview, _memoryviewslice):
14199  * memviewsliceobj = memview
14200  * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
14201  * else:
14202  * slice_copy(memview, &src)
14203  */
14204  __Pyx_TraceLine(728,0,__PYX_ERR(1, 728, __pyx_L1_error))
14205  __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
14206 
14207  /* "View.MemoryView":726
14208  * assert memview.view.ndim > 0
14209  *
14210  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14211  * memviewsliceobj = memview
14212  * p_src = &memviewsliceobj.from_slice
14213  */
14214  goto __pyx_L3;
14215  }
14216 
14217  /* "View.MemoryView":730
14218  * p_src = &memviewsliceobj.from_slice
14219  * else:
14220  * slice_copy(memview, &src) # <<<<<<<<<<<<<<
14221  * p_src = &src
14222  *
14223  */
14224  __Pyx_TraceLine(730,0,__PYX_ERR(1, 730, __pyx_L1_error))
14225  /*else*/ {
14226  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
14227 
14228  /* "View.MemoryView":731
14229  * else:
14230  * slice_copy(memview, &src)
14231  * p_src = &src # <<<<<<<<<<<<<<
14232  *
14233  *
14234  */
14235  __Pyx_TraceLine(731,0,__PYX_ERR(1, 731, __pyx_L1_error))
14236  __pyx_v_p_src = (&__pyx_v_src);
14237  }
14238  __pyx_L3:;
14239 
14240  /* "View.MemoryView":737
14241  *
14242  *
14243  * dst.memview = p_src.memview # <<<<<<<<<<<<<<
14244  * dst.data = p_src.data
14245  *
14246  */
14247  __Pyx_TraceLine(737,0,__PYX_ERR(1, 737, __pyx_L1_error))
14248  __pyx_t_4 = __pyx_v_p_src->memview;
14249  __pyx_v_dst.memview = __pyx_t_4;
14250 
14251  /* "View.MemoryView":738
14252  *
14253  * dst.memview = p_src.memview
14254  * dst.data = p_src.data # <<<<<<<<<<<<<<
14255  *
14256  *
14257  */
14258  __Pyx_TraceLine(738,0,__PYX_ERR(1, 738, __pyx_L1_error))
14259  __pyx_t_5 = __pyx_v_p_src->data;
14260  __pyx_v_dst.data = __pyx_t_5;
14261 
14262  /* "View.MemoryView":743
14263  *
14264  *
14265  * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
14266  * cdef int *p_suboffset_dim = &suboffset_dim
14267  * cdef Py_ssize_t start, stop, step
14268  */
14269  __Pyx_TraceLine(743,0,__PYX_ERR(1, 743, __pyx_L1_error))
14270  __pyx_v_p_dst = (&__pyx_v_dst);
14271 
14272  /* "View.MemoryView":744
14273  *
14274  * cdef __Pyx_memviewslice *p_dst = &dst
14275  * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
14276  * cdef Py_ssize_t start, stop, step
14277  * cdef bint have_start, have_stop, have_step
14278  */
14279  __Pyx_TraceLine(744,0,__PYX_ERR(1, 744, __pyx_L1_error))
14280  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
14281 
14282  /* "View.MemoryView":748
14283  * cdef bint have_start, have_stop, have_step
14284  *
14285  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
14286  * if PyIndex_Check(index):
14287  * slice_memviewslice(
14288  */
14289  __Pyx_TraceLine(748,0,__PYX_ERR(1, 748, __pyx_L1_error))
14290  __pyx_t_6 = 0;
14291  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
14292  __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
14293  __pyx_t_8 = NULL;
14294  } else {
14295  __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 748, __pyx_L1_error)
14296  __Pyx_GOTREF(__pyx_t_3);
14297  __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 748, __pyx_L1_error)
14298  }
14299  for (;;) {
14300  if (likely(!__pyx_t_8)) {
14301  if (likely(PyList_CheckExact(__pyx_t_3))) {
14302  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
14303  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14304  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 748, __pyx_L1_error)
14305  #else
14306  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 748, __pyx_L1_error)
14307  __Pyx_GOTREF(__pyx_t_9);
14308  #endif
14309  } else {
14310  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
14311  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14312  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 748, __pyx_L1_error)
14313  #else
14314  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 748, __pyx_L1_error)
14315  __Pyx_GOTREF(__pyx_t_9);
14316  #endif
14317  }
14318  } else {
14319  __pyx_t_9 = __pyx_t_8(__pyx_t_3);
14320  if (unlikely(!__pyx_t_9)) {
14321  PyObject* exc_type = PyErr_Occurred();
14322  if (exc_type) {
14323  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14324  else __PYX_ERR(1, 748, __pyx_L1_error)
14325  }
14326  break;
14327  }
14328  __Pyx_GOTREF(__pyx_t_9);
14329  }
14330  __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
14331  __pyx_t_9 = 0;
14332  __pyx_v_dim = __pyx_t_6;
14333  __pyx_t_6 = (__pyx_t_6 + 1);
14334 
14335  /* "View.MemoryView":749
14336  *
14337  * for dim, index in enumerate(indices):
14338  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
14339  * slice_memviewslice(
14340  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14341  */
14342  __Pyx_TraceLine(749,0,__PYX_ERR(1, 749, __pyx_L1_error))
14343  __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
14344  if (__pyx_t_2) {
14345 
14346  /* "View.MemoryView":753
14347  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14348  * dim, new_ndim, p_suboffset_dim,
14349  * index, 0, 0, # start, stop, step # <<<<<<<<<<<<<<
14350  * 0, 0, 0, # have_{start,stop,step}
14351  * False)
14352  */
14353  __Pyx_TraceLine(753,0,__PYX_ERR(1, 753, __pyx_L1_error))
14354  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 753, __pyx_L1_error)
14355 
14356  /* "View.MemoryView":750
14357  * for dim, index in enumerate(indices):
14358  * if PyIndex_Check(index):
14359  * slice_memviewslice( # <<<<<<<<<<<<<<
14360  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14361  * dim, new_ndim, p_suboffset_dim,
14362  */
14363  __Pyx_TraceLine(750,0,__PYX_ERR(1, 750, __pyx_L1_error))
14364  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 750, __pyx_L1_error)
14365 
14366  /* "View.MemoryView":749
14367  *
14368  * for dim, index in enumerate(indices):
14369  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
14370  * slice_memviewslice(
14371  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14372  */
14373  goto __pyx_L6;
14374  }
14375 
14376  /* "View.MemoryView":756
14377  * 0, 0, 0, # have_{start,stop,step}
14378  * False)
14379  * elif index is None: # <<<<<<<<<<<<<<
14380  * p_dst.shape[new_ndim] = 1
14381  * p_dst.strides[new_ndim] = 0
14382  */
14383  __Pyx_TraceLine(756,0,__PYX_ERR(1, 756, __pyx_L1_error))
14384  __pyx_t_2 = (__pyx_v_index == Py_None);
14385  __pyx_t_1 = (__pyx_t_2 != 0);
14386  if (__pyx_t_1) {
14387 
14388  /* "View.MemoryView":757
14389  * False)
14390  * elif index is None:
14391  * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
14392  * p_dst.strides[new_ndim] = 0
14393  * p_dst.suboffsets[new_ndim] = -1
14394  */
14395  __Pyx_TraceLine(757,0,__PYX_ERR(1, 757, __pyx_L1_error))
14396  (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
14397 
14398  /* "View.MemoryView":758
14399  * elif index is None:
14400  * p_dst.shape[new_ndim] = 1
14401  * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
14402  * p_dst.suboffsets[new_ndim] = -1
14403  * new_ndim += 1
14404  */
14405  __Pyx_TraceLine(758,0,__PYX_ERR(1, 758, __pyx_L1_error))
14406  (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
14407 
14408  /* "View.MemoryView":759
14409  * p_dst.shape[new_ndim] = 1
14410  * p_dst.strides[new_ndim] = 0
14411  * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
14412  * new_ndim += 1
14413  * else:
14414  */
14415  __Pyx_TraceLine(759,0,__PYX_ERR(1, 759, __pyx_L1_error))
14416  (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
14417 
14418  /* "View.MemoryView":760
14419  * p_dst.strides[new_ndim] = 0
14420  * p_dst.suboffsets[new_ndim] = -1
14421  * new_ndim += 1 # <<<<<<<<<<<<<<
14422  * else:
14423  * start = index.start or 0
14424  */
14425  __Pyx_TraceLine(760,0,__PYX_ERR(1, 760, __pyx_L1_error))
14426  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
14427 
14428  /* "View.MemoryView":756
14429  * 0, 0, 0, # have_{start,stop,step}
14430  * False)
14431  * elif index is None: # <<<<<<<<<<<<<<
14432  * p_dst.shape[new_ndim] = 1
14433  * p_dst.strides[new_ndim] = 0
14434  */
14435  goto __pyx_L6;
14436  }
14437 
14438  /* "View.MemoryView":762
14439  * new_ndim += 1
14440  * else:
14441  * start = index.start or 0 # <<<<<<<<<<<<<<
14442  * stop = index.stop or 0
14443  * step = index.step or 0
14444  */
14445  __Pyx_TraceLine(762,0,__PYX_ERR(1, 762, __pyx_L1_error))
14446  /*else*/ {
14447  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 762, __pyx_L1_error)
14448  __Pyx_GOTREF(__pyx_t_9);
14449  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 762, __pyx_L1_error)
14450  if (!__pyx_t_1) {
14451  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14452  } else {
14453  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)
14454  __pyx_t_10 = __pyx_t_12;
14455  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14456  goto __pyx_L7_bool_binop_done;
14457  }
14458  __pyx_t_10 = 0;
14459  __pyx_L7_bool_binop_done:;
14460  __pyx_v_start = __pyx_t_10;
14461 
14462  /* "View.MemoryView":763
14463  * else:
14464  * start = index.start or 0
14465  * stop = index.stop or 0 # <<<<<<<<<<<<<<
14466  * step = index.step or 0
14467  *
14468  */
14469  __Pyx_TraceLine(763,0,__PYX_ERR(1, 763, __pyx_L1_error))
14470  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 763, __pyx_L1_error)
14471  __Pyx_GOTREF(__pyx_t_9);
14472  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 763, __pyx_L1_error)
14473  if (!__pyx_t_1) {
14474  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14475  } else {
14476  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error)
14477  __pyx_t_10 = __pyx_t_12;
14478  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14479  goto __pyx_L9_bool_binop_done;
14480  }
14481  __pyx_t_10 = 0;
14482  __pyx_L9_bool_binop_done:;
14483  __pyx_v_stop = __pyx_t_10;
14484 
14485  /* "View.MemoryView":764
14486  * start = index.start or 0
14487  * stop = index.stop or 0
14488  * step = index.step or 0 # <<<<<<<<<<<<<<
14489  *
14490  * have_start = index.start is not None
14491  */
14492  __Pyx_TraceLine(764,0,__PYX_ERR(1, 764, __pyx_L1_error))
14493  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 764, __pyx_L1_error)
14494  __Pyx_GOTREF(__pyx_t_9);
14495  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 764, __pyx_L1_error)
14496  if (!__pyx_t_1) {
14497  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14498  } else {
14499  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error)
14500  __pyx_t_10 = __pyx_t_12;
14501  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14502  goto __pyx_L11_bool_binop_done;
14503  }
14504  __pyx_t_10 = 0;
14505  __pyx_L11_bool_binop_done:;
14506  __pyx_v_step = __pyx_t_10;
14507 
14508  /* "View.MemoryView":766
14509  * step = index.step or 0
14510  *
14511  * have_start = index.start is not None # <<<<<<<<<<<<<<
14512  * have_stop = index.stop is not None
14513  * have_step = index.step is not None
14514  */
14515  __Pyx_TraceLine(766,0,__PYX_ERR(1, 766, __pyx_L1_error))
14516  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 766, __pyx_L1_error)
14517  __Pyx_GOTREF(__pyx_t_9);
14518  __pyx_t_1 = (__pyx_t_9 != Py_None);
14519  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14520  __pyx_v_have_start = __pyx_t_1;
14521 
14522  /* "View.MemoryView":767
14523  *
14524  * have_start = index.start is not None
14525  * have_stop = index.stop is not None # <<<<<<<<<<<<<<
14526  * have_step = index.step is not None
14527  *
14528  */
14529  __Pyx_TraceLine(767,0,__PYX_ERR(1, 767, __pyx_L1_error))
14530  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 767, __pyx_L1_error)
14531  __Pyx_GOTREF(__pyx_t_9);
14532  __pyx_t_1 = (__pyx_t_9 != Py_None);
14533  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14534  __pyx_v_have_stop = __pyx_t_1;
14535 
14536  /* "View.MemoryView":768
14537  * have_start = index.start is not None
14538  * have_stop = index.stop is not None
14539  * have_step = index.step is not None # <<<<<<<<<<<<<<
14540  *
14541  * slice_memviewslice(
14542  */
14543  __Pyx_TraceLine(768,0,__PYX_ERR(1, 768, __pyx_L1_error))
14544  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 768, __pyx_L1_error)
14545  __Pyx_GOTREF(__pyx_t_9);
14546  __pyx_t_1 = (__pyx_t_9 != Py_None);
14547  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14548  __pyx_v_have_step = __pyx_t_1;
14549 
14550  /* "View.MemoryView":770
14551  * have_step = index.step is not None
14552  *
14553  * slice_memviewslice( # <<<<<<<<<<<<<<
14554  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14555  * dim, new_ndim, p_suboffset_dim,
14556  */
14557  __Pyx_TraceLine(770,0,__PYX_ERR(1, 770, __pyx_L1_error))
14558  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 770, __pyx_L1_error)
14559 
14560  /* "View.MemoryView":776
14561  * have_start, have_stop, have_step,
14562  * True)
14563  * new_ndim += 1 # <<<<<<<<<<<<<<
14564  *
14565  * if isinstance(memview, _memoryviewslice):
14566  */
14567  __Pyx_TraceLine(776,0,__PYX_ERR(1, 776, __pyx_L1_error))
14568  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
14569  }
14570  __pyx_L6:;
14571 
14572  /* "View.MemoryView":748
14573  * cdef bint have_start, have_stop, have_step
14574  *
14575  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
14576  * if PyIndex_Check(index):
14577  * slice_memviewslice(
14578  */
14579  __Pyx_TraceLine(748,0,__PYX_ERR(1, 748, __pyx_L1_error))
14580  }
14581  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14582 
14583  /* "View.MemoryView":778
14584  * new_ndim += 1
14585  *
14586  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14587  * return memoryview_fromslice(dst, new_ndim,
14588  * memviewsliceobj.to_object_func,
14589  */
14590  __Pyx_TraceLine(778,0,__PYX_ERR(1, 778, __pyx_L1_error))
14591  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
14592  __pyx_t_2 = (__pyx_t_1 != 0);
14593  if (__pyx_t_2) {
14594 
14595  /* "View.MemoryView":779
14596  *
14597  * if isinstance(memview, _memoryviewslice):
14598  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
14599  * memviewsliceobj.to_object_func,
14600  * memviewsliceobj.to_dtype_func,
14601  */
14602  __Pyx_TraceLine(779,0,__PYX_ERR(1, 779, __pyx_L1_error))
14603  __Pyx_XDECREF(((PyObject *)__pyx_r));
14604 
14605  /* "View.MemoryView":780
14606  * if isinstance(memview, _memoryviewslice):
14607  * return memoryview_fromslice(dst, new_ndim,
14608  * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
14609  * memviewsliceobj.to_dtype_func,
14610  * memview.dtype_is_object)
14611  */
14612  __Pyx_TraceLine(780,0,__PYX_ERR(1, 780, __pyx_L1_error))
14613  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 780, __pyx_L1_error) }
14614 
14615  /* "View.MemoryView":781
14616  * return memoryview_fromslice(dst, new_ndim,
14617  * memviewsliceobj.to_object_func,
14618  * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
14619  * memview.dtype_is_object)
14620  * else:
14621  */
14622  __Pyx_TraceLine(781,0,__PYX_ERR(1, 781, __pyx_L1_error))
14623  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) }
14624 
14625  /* "View.MemoryView":779
14626  *
14627  * if isinstance(memview, _memoryviewslice):
14628  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
14629  * memviewsliceobj.to_object_func,
14630  * memviewsliceobj.to_dtype_func,
14631  */
14632  __Pyx_TraceLine(779,0,__PYX_ERR(1, 779, __pyx_L1_error))
14633  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 779, __pyx_L1_error)
14634  __Pyx_GOTREF(__pyx_t_3);
14635  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 779, __pyx_L1_error)
14636  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
14637  __pyx_t_3 = 0;
14638  goto __pyx_L0;
14639 
14640  /* "View.MemoryView":778
14641  * new_ndim += 1
14642  *
14643  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14644  * return memoryview_fromslice(dst, new_ndim,
14645  * memviewsliceobj.to_object_func,
14646  */
14647  }
14648 
14649  /* "View.MemoryView":784
14650  * memview.dtype_is_object)
14651  * else:
14652  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
14653  * memview.dtype_is_object)
14654  *
14655  */
14656  __Pyx_TraceLine(784,0,__PYX_ERR(1, 784, __pyx_L1_error))
14657  /*else*/ {
14658  __Pyx_XDECREF(((PyObject *)__pyx_r));
14659 
14660  /* "View.MemoryView":785
14661  * else:
14662  * return memoryview_fromslice(dst, new_ndim, NULL, NULL,
14663  * memview.dtype_is_object) # <<<<<<<<<<<<<<
14664  *
14665  *
14666  */
14667  __Pyx_TraceLine(785,0,__PYX_ERR(1, 785, __pyx_L1_error))
14668  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 784, __pyx_L1_error)
14669  __Pyx_GOTREF(__pyx_t_3);
14670 
14671  /* "View.MemoryView":784
14672  * memview.dtype_is_object)
14673  * else:
14674  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
14675  * memview.dtype_is_object)
14676  *
14677  */
14678  __Pyx_TraceLine(784,0,__PYX_ERR(1, 784, __pyx_L1_error))
14679  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 784, __pyx_L1_error)
14680  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
14681  __pyx_t_3 = 0;
14682  goto __pyx_L0;
14683  }
14684 
14685  /* "View.MemoryView":712
14686  *
14687  * @cname('__pyx_memview_slice')
14688  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
14689  * cdef int new_ndim = 0, suboffset_dim = -1, dim
14690  * cdef bint negative_step
14691  */
14692 
14693  /* function exit code */
14694  __pyx_L1_error:;
14695  __Pyx_XDECREF(__pyx_t_3);
14696  __Pyx_XDECREF(__pyx_t_9);
14697  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
14698  __pyx_r = 0;
14699  __pyx_L0:;
14700  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
14701  __Pyx_XDECREF(__pyx_v_index);
14702  __Pyx_XGIVEREF((PyObject *)__pyx_r);
14703  __Pyx_TraceReturn(__pyx_r, 0);
14704  __Pyx_RefNannyFinishContext();
14705  return __pyx_r;
14706 }
14707 
14708 /* "View.MemoryView":809
14709  *
14710  * @cname('__pyx_memoryview_slice_memviewslice')
14711  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
14712  * __Pyx_memviewslice *dst,
14713  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
14714  */
14715 
14716 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
14717  Py_ssize_t __pyx_v_new_shape;
14718  int __pyx_v_negative_step;
14719  int __pyx_r;
14720  __Pyx_TraceDeclarations
14721  int __pyx_t_1;
14722  int __pyx_t_2;
14723  int __pyx_t_3;
14724  int __pyx_lineno = 0;
14725  const char *__pyx_filename = NULL;
14726  int __pyx_clineno = 0;
14727  __Pyx_TraceCall("slice_memviewslice", __pyx_f[1], 809, 1, __PYX_ERR(1, 809, __pyx_L1_error));
14728 
14729  /* "View.MemoryView":829
14730  * cdef bint negative_step
14731  *
14732  * if not is_slice: # <<<<<<<<<<<<<<
14733  *
14734  * if start < 0:
14735  */
14736  __Pyx_TraceLine(829,1,__PYX_ERR(1, 829, __pyx_L1_error))
14737  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
14738  if (__pyx_t_1) {
14739 
14740  /* "View.MemoryView":831
14741  * if not is_slice:
14742  *
14743  * if start < 0: # <<<<<<<<<<<<<<
14744  * start += shape
14745  * if not 0 <= start < shape:
14746  */
14747  __Pyx_TraceLine(831,1,__PYX_ERR(1, 831, __pyx_L1_error))
14748  __pyx_t_1 = ((__pyx_v_start < 0) != 0);
14749  if (__pyx_t_1) {
14750 
14751  /* "View.MemoryView":832
14752  *
14753  * if start < 0:
14754  * start += shape # <<<<<<<<<<<<<<
14755  * if not 0 <= start < shape:
14756  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
14757  */
14758  __Pyx_TraceLine(832,1,__PYX_ERR(1, 832, __pyx_L1_error))
14759  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
14760 
14761  /* "View.MemoryView":831
14762  * if not is_slice:
14763  *
14764  * if start < 0: # <<<<<<<<<<<<<<
14765  * start += shape
14766  * if not 0 <= start < shape:
14767  */
14768  }
14769 
14770  /* "View.MemoryView":833
14771  * if start < 0:
14772  * start += shape
14773  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
14774  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
14775  * else:
14776  */
14777  __Pyx_TraceLine(833,1,__PYX_ERR(1, 833, __pyx_L1_error))
14778  __pyx_t_1 = (0 <= __pyx_v_start);
14779  if (__pyx_t_1) {
14780  __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
14781  }
14782  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
14783  if (__pyx_t_2) {
14784 
14785  /* "View.MemoryView":834
14786  * start += shape
14787  * if not 0 <= start < shape:
14788  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<<
14789  * else:
14790  *
14791  */
14792  __Pyx_TraceLine(834,1,__PYX_ERR(1, 834, __pyx_L1_error))
14793  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 834, __pyx_L1_error)
14794 
14795  /* "View.MemoryView":833
14796  * if start < 0:
14797  * start += shape
14798  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
14799  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
14800  * else:
14801  */
14802  }
14803 
14804  /* "View.MemoryView":829
14805  * cdef bint negative_step
14806  *
14807  * if not is_slice: # <<<<<<<<<<<<<<
14808  *
14809  * if start < 0:
14810  */
14811  goto __pyx_L3;
14812  }
14813 
14814  /* "View.MemoryView":837
14815  * else:
14816  *
14817  * negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<<
14818  *
14819  * if have_step and step == 0:
14820  */
14821  __Pyx_TraceLine(837,1,__PYX_ERR(1, 837, __pyx_L1_error))
14822  /*else*/ {
14823  __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
14824  if (__pyx_t_1) {
14825  } else {
14826  __pyx_t_2 = __pyx_t_1;
14827  goto __pyx_L6_bool_binop_done;
14828  }
14829  __pyx_t_1 = ((__pyx_v_step < 0) != 0);
14830  __pyx_t_2 = __pyx_t_1;
14831  __pyx_L6_bool_binop_done:;
14832  __pyx_v_negative_step = __pyx_t_2;
14833 
14834  /* "View.MemoryView":839
14835  * negative_step = have_step != 0 and step < 0
14836  *
14837  * if have_step and step == 0: # <<<<<<<<<<<<<<
14838  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
14839  *
14840  */
14841  __Pyx_TraceLine(839,1,__PYX_ERR(1, 839, __pyx_L1_error))
14842  __pyx_t_1 = (__pyx_v_have_step != 0);
14843  if (__pyx_t_1) {
14844  } else {
14845  __pyx_t_2 = __pyx_t_1;
14846  goto __pyx_L9_bool_binop_done;
14847  }
14848  __pyx_t_1 = ((__pyx_v_step == 0) != 0);
14849  __pyx_t_2 = __pyx_t_1;
14850  __pyx_L9_bool_binop_done:;
14851  if (__pyx_t_2) {
14852 
14853  /* "View.MemoryView":840
14854  *
14855  * if have_step and step == 0:
14856  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<<
14857  *
14858  *
14859  */
14860  __Pyx_TraceLine(840,1,__PYX_ERR(1, 840, __pyx_L1_error))
14861  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 840, __pyx_L1_error)
14862 
14863  /* "View.MemoryView":839
14864  * negative_step = have_step != 0 and step < 0
14865  *
14866  * if have_step and step == 0: # <<<<<<<<<<<<<<
14867  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
14868  *
14869  */
14870  }
14871 
14872  /* "View.MemoryView":843
14873  *
14874  *
14875  * if have_start: # <<<<<<<<<<<<<<
14876  * if start < 0:
14877  * start += shape
14878  */
14879  __Pyx_TraceLine(843,1,__PYX_ERR(1, 843, __pyx_L1_error))
14880  __pyx_t_2 = (__pyx_v_have_start != 0);
14881  if (__pyx_t_2) {
14882 
14883  /* "View.MemoryView":844
14884  *
14885  * if have_start:
14886  * if start < 0: # <<<<<<<<<<<<<<
14887  * start += shape
14888  * if start < 0:
14889  */
14890  __Pyx_TraceLine(844,1,__PYX_ERR(1, 844, __pyx_L1_error))
14891  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
14892  if (__pyx_t_2) {
14893 
14894  /* "View.MemoryView":845
14895  * if have_start:
14896  * if start < 0:
14897  * start += shape # <<<<<<<<<<<<<<
14898  * if start < 0:
14899  * start = 0
14900  */
14901  __Pyx_TraceLine(845,1,__PYX_ERR(1, 845, __pyx_L1_error))
14902  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
14903 
14904  /* "View.MemoryView":846
14905  * if start < 0:
14906  * start += shape
14907  * if start < 0: # <<<<<<<<<<<<<<
14908  * start = 0
14909  * elif start >= shape:
14910  */
14911  __Pyx_TraceLine(846,1,__PYX_ERR(1, 846, __pyx_L1_error))
14912  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
14913  if (__pyx_t_2) {
14914 
14915  /* "View.MemoryView":847
14916  * start += shape
14917  * if start < 0:
14918  * start = 0 # <<<<<<<<<<<<<<
14919  * elif start >= shape:
14920  * if negative_step:
14921  */
14922  __Pyx_TraceLine(847,1,__PYX_ERR(1, 847, __pyx_L1_error))
14923  __pyx_v_start = 0;
14924 
14925  /* "View.MemoryView":846
14926  * if start < 0:
14927  * start += shape
14928  * if start < 0: # <<<<<<<<<<<<<<
14929  * start = 0
14930  * elif start >= shape:
14931  */
14932  }
14933 
14934  /* "View.MemoryView":844
14935  *
14936  * if have_start:
14937  * if start < 0: # <<<<<<<<<<<<<<
14938  * start += shape
14939  * if start < 0:
14940  */
14941  goto __pyx_L12;
14942  }
14943 
14944  /* "View.MemoryView":848
14945  * if start < 0:
14946  * start = 0
14947  * elif start >= shape: # <<<<<<<<<<<<<<
14948  * if negative_step:
14949  * start = shape - 1
14950  */
14951  __Pyx_TraceLine(848,1,__PYX_ERR(1, 848, __pyx_L1_error))
14952  __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
14953  if (__pyx_t_2) {
14954 
14955  /* "View.MemoryView":849
14956  * start = 0
14957  * elif start >= shape:
14958  * if negative_step: # <<<<<<<<<<<<<<
14959  * start = shape - 1
14960  * else:
14961  */
14962  __Pyx_TraceLine(849,1,__PYX_ERR(1, 849, __pyx_L1_error))
14963  __pyx_t_2 = (__pyx_v_negative_step != 0);
14964  if (__pyx_t_2) {
14965 
14966  /* "View.MemoryView":850
14967  * elif start >= shape:
14968  * if negative_step:
14969  * start = shape - 1 # <<<<<<<<<<<<<<
14970  * else:
14971  * start = shape
14972  */
14973  __Pyx_TraceLine(850,1,__PYX_ERR(1, 850, __pyx_L1_error))
14974  __pyx_v_start = (__pyx_v_shape - 1);
14975 
14976  /* "View.MemoryView":849
14977  * start = 0
14978  * elif start >= shape:
14979  * if negative_step: # <<<<<<<<<<<<<<
14980  * start = shape - 1
14981  * else:
14982  */
14983  goto __pyx_L14;
14984  }
14985 
14986  /* "View.MemoryView":852
14987  * start = shape - 1
14988  * else:
14989  * start = shape # <<<<<<<<<<<<<<
14990  * else:
14991  * if negative_step:
14992  */
14993  __Pyx_TraceLine(852,1,__PYX_ERR(1, 852, __pyx_L1_error))
14994  /*else*/ {
14995  __pyx_v_start = __pyx_v_shape;
14996  }
14997  __pyx_L14:;
14998 
14999  /* "View.MemoryView":848
15000  * if start < 0:
15001  * start = 0
15002  * elif start >= shape: # <<<<<<<<<<<<<<
15003  * if negative_step:
15004  * start = shape - 1
15005  */
15006  }
15007  __pyx_L12:;
15008 
15009  /* "View.MemoryView":843
15010  *
15011  *
15012  * if have_start: # <<<<<<<<<<<<<<
15013  * if start < 0:
15014  * start += shape
15015  */
15016  goto __pyx_L11;
15017  }
15018 
15019  /* "View.MemoryView":854
15020  * start = shape
15021  * else:
15022  * if negative_step: # <<<<<<<<<<<<<<
15023  * start = shape - 1
15024  * else:
15025  */
15026  __Pyx_TraceLine(854,1,__PYX_ERR(1, 854, __pyx_L1_error))
15027  /*else*/ {
15028  __pyx_t_2 = (__pyx_v_negative_step != 0);
15029  if (__pyx_t_2) {
15030 
15031  /* "View.MemoryView":855
15032  * else:
15033  * if negative_step:
15034  * start = shape - 1 # <<<<<<<<<<<<<<
15035  * else:
15036  * start = 0
15037  */
15038  __Pyx_TraceLine(855,1,__PYX_ERR(1, 855, __pyx_L1_error))
15039  __pyx_v_start = (__pyx_v_shape - 1);
15040 
15041  /* "View.MemoryView":854
15042  * start = shape
15043  * else:
15044  * if negative_step: # <<<<<<<<<<<<<<
15045  * start = shape - 1
15046  * else:
15047  */
15048  goto __pyx_L15;
15049  }
15050 
15051  /* "View.MemoryView":857
15052  * start = shape - 1
15053  * else:
15054  * start = 0 # <<<<<<<<<<<<<<
15055  *
15056  * if have_stop:
15057  */
15058  __Pyx_TraceLine(857,1,__PYX_ERR(1, 857, __pyx_L1_error))
15059  /*else*/ {
15060  __pyx_v_start = 0;
15061  }
15062  __pyx_L15:;
15063  }
15064  __pyx_L11:;
15065 
15066  /* "View.MemoryView":859
15067  * start = 0
15068  *
15069  * if have_stop: # <<<<<<<<<<<<<<
15070  * if stop < 0:
15071  * stop += shape
15072  */
15073  __Pyx_TraceLine(859,1,__PYX_ERR(1, 859, __pyx_L1_error))
15074  __pyx_t_2 = (__pyx_v_have_stop != 0);
15075  if (__pyx_t_2) {
15076 
15077  /* "View.MemoryView":860
15078  *
15079  * if have_stop:
15080  * if stop < 0: # <<<<<<<<<<<<<<
15081  * stop += shape
15082  * if stop < 0:
15083  */
15084  __Pyx_TraceLine(860,1,__PYX_ERR(1, 860, __pyx_L1_error))
15085  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
15086  if (__pyx_t_2) {
15087 
15088  /* "View.MemoryView":861
15089  * if have_stop:
15090  * if stop < 0:
15091  * stop += shape # <<<<<<<<<<<<<<
15092  * if stop < 0:
15093  * stop = 0
15094  */
15095  __Pyx_TraceLine(861,1,__PYX_ERR(1, 861, __pyx_L1_error))
15096  __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
15097 
15098  /* "View.MemoryView":862
15099  * if stop < 0:
15100  * stop += shape
15101  * if stop < 0: # <<<<<<<<<<<<<<
15102  * stop = 0
15103  * elif stop > shape:
15104  */
15105  __Pyx_TraceLine(862,1,__PYX_ERR(1, 862, __pyx_L1_error))
15106  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
15107  if (__pyx_t_2) {
15108 
15109  /* "View.MemoryView":863
15110  * stop += shape
15111  * if stop < 0:
15112  * stop = 0 # <<<<<<<<<<<<<<
15113  * elif stop > shape:
15114  * stop = shape
15115  */
15116  __Pyx_TraceLine(863,1,__PYX_ERR(1, 863, __pyx_L1_error))
15117  __pyx_v_stop = 0;
15118 
15119  /* "View.MemoryView":862
15120  * if stop < 0:
15121  * stop += shape
15122  * if stop < 0: # <<<<<<<<<<<<<<
15123  * stop = 0
15124  * elif stop > shape:
15125  */
15126  }
15127 
15128  /* "View.MemoryView":860
15129  *
15130  * if have_stop:
15131  * if stop < 0: # <<<<<<<<<<<<<<
15132  * stop += shape
15133  * if stop < 0:
15134  */
15135  goto __pyx_L17;
15136  }
15137 
15138  /* "View.MemoryView":864
15139  * if stop < 0:
15140  * stop = 0
15141  * elif stop > shape: # <<<<<<<<<<<<<<
15142  * stop = shape
15143  * else:
15144  */
15145  __Pyx_TraceLine(864,1,__PYX_ERR(1, 864, __pyx_L1_error))
15146  __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
15147  if (__pyx_t_2) {
15148 
15149  /* "View.MemoryView":865
15150  * stop = 0
15151  * elif stop > shape:
15152  * stop = shape # <<<<<<<<<<<<<<
15153  * else:
15154  * if negative_step:
15155  */
15156  __Pyx_TraceLine(865,1,__PYX_ERR(1, 865, __pyx_L1_error))
15157  __pyx_v_stop = __pyx_v_shape;
15158 
15159  /* "View.MemoryView":864
15160  * if stop < 0:
15161  * stop = 0
15162  * elif stop > shape: # <<<<<<<<<<<<<<
15163  * stop = shape
15164  * else:
15165  */
15166  }
15167  __pyx_L17:;
15168 
15169  /* "View.MemoryView":859
15170  * start = 0
15171  *
15172  * if have_stop: # <<<<<<<<<<<<<<
15173  * if stop < 0:
15174  * stop += shape
15175  */
15176  goto __pyx_L16;
15177  }
15178 
15179  /* "View.MemoryView":867
15180  * stop = shape
15181  * else:
15182  * if negative_step: # <<<<<<<<<<<<<<
15183  * stop = -1
15184  * else:
15185  */
15186  __Pyx_TraceLine(867,1,__PYX_ERR(1, 867, __pyx_L1_error))
15187  /*else*/ {
15188  __pyx_t_2 = (__pyx_v_negative_step != 0);
15189  if (__pyx_t_2) {
15190 
15191  /* "View.MemoryView":868
15192  * else:
15193  * if negative_step:
15194  * stop = -1 # <<<<<<<<<<<<<<
15195  * else:
15196  * stop = shape
15197  */
15198  __Pyx_TraceLine(868,1,__PYX_ERR(1, 868, __pyx_L1_error))
15199  __pyx_v_stop = -1L;
15200 
15201  /* "View.MemoryView":867
15202  * stop = shape
15203  * else:
15204  * if negative_step: # <<<<<<<<<<<<<<
15205  * stop = -1
15206  * else:
15207  */
15208  goto __pyx_L19;
15209  }
15210 
15211  /* "View.MemoryView":870
15212  * stop = -1
15213  * else:
15214  * stop = shape # <<<<<<<<<<<<<<
15215  *
15216  * if not have_step:
15217  */
15218  __Pyx_TraceLine(870,1,__PYX_ERR(1, 870, __pyx_L1_error))
15219  /*else*/ {
15220  __pyx_v_stop = __pyx_v_shape;
15221  }
15222  __pyx_L19:;
15223  }
15224  __pyx_L16:;
15225 
15226  /* "View.MemoryView":872
15227  * stop = shape
15228  *
15229  * if not have_step: # <<<<<<<<<<<<<<
15230  * step = 1
15231  *
15232  */
15233  __Pyx_TraceLine(872,1,__PYX_ERR(1, 872, __pyx_L1_error))
15234  __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
15235  if (__pyx_t_2) {
15236 
15237  /* "View.MemoryView":873
15238  *
15239  * if not have_step:
15240  * step = 1 # <<<<<<<<<<<<<<
15241  *
15242  *
15243  */
15244  __Pyx_TraceLine(873,1,__PYX_ERR(1, 873, __pyx_L1_error))
15245  __pyx_v_step = 1;
15246 
15247  /* "View.MemoryView":872
15248  * stop = shape
15249  *
15250  * if not have_step: # <<<<<<<<<<<<<<
15251  * step = 1
15252  *
15253  */
15254  }
15255 
15256  /* "View.MemoryView":877
15257  *
15258  * with cython.cdivision(True):
15259  * new_shape = (stop - start) // step # <<<<<<<<<<<<<<
15260  *
15261  * if (stop - start) - step * new_shape:
15262  */
15263  __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
15264 
15265  /* "View.MemoryView":879
15266  * new_shape = (stop - start) // step
15267  *
15268  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
15269  * new_shape += 1
15270  *
15271  */
15272  __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
15273  if (__pyx_t_2) {
15274 
15275  /* "View.MemoryView":880
15276  *
15277  * if (stop - start) - step * new_shape:
15278  * new_shape += 1 # <<<<<<<<<<<<<<
15279  *
15280  * if new_shape < 0:
15281  */
15282  __pyx_v_new_shape = (__pyx_v_new_shape + 1);
15283 
15284  /* "View.MemoryView":879
15285  * new_shape = (stop - start) // step
15286  *
15287  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
15288  * new_shape += 1
15289  *
15290  */
15291  }
15292 
15293  /* "View.MemoryView":882
15294  * new_shape += 1
15295  *
15296  * if new_shape < 0: # <<<<<<<<<<<<<<
15297  * new_shape = 0
15298  *
15299  */
15300  __Pyx_TraceLine(882,1,__PYX_ERR(1, 882, __pyx_L1_error))
15301  __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
15302  if (__pyx_t_2) {
15303 
15304  /* "View.MemoryView":883
15305  *
15306  * if new_shape < 0:
15307  * new_shape = 0 # <<<<<<<<<<<<<<
15308  *
15309  *
15310  */
15311  __Pyx_TraceLine(883,1,__PYX_ERR(1, 883, __pyx_L1_error))
15312  __pyx_v_new_shape = 0;
15313 
15314  /* "View.MemoryView":882
15315  * new_shape += 1
15316  *
15317  * if new_shape < 0: # <<<<<<<<<<<<<<
15318  * new_shape = 0
15319  *
15320  */
15321  }
15322 
15323  /* "View.MemoryView":886
15324  *
15325  *
15326  * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<<
15327  * dst.shape[new_ndim] = new_shape
15328  * dst.suboffsets[new_ndim] = suboffset
15329  */
15330  __Pyx_TraceLine(886,1,__PYX_ERR(1, 886, __pyx_L1_error))
15331  (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
15332 
15333  /* "View.MemoryView":887
15334  *
15335  * dst.strides[new_ndim] = stride * step
15336  * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<<
15337  * dst.suboffsets[new_ndim] = suboffset
15338  *
15339  */
15340  __Pyx_TraceLine(887,1,__PYX_ERR(1, 887, __pyx_L1_error))
15341  (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
15342 
15343  /* "View.MemoryView":888
15344  * dst.strides[new_ndim] = stride * step
15345  * dst.shape[new_ndim] = new_shape
15346  * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<<
15347  *
15348  *
15349  */
15350  __Pyx_TraceLine(888,1,__PYX_ERR(1, 888, __pyx_L1_error))
15351  (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
15352  }
15353  __pyx_L3:;
15354 
15355  /* "View.MemoryView":891
15356  *
15357  *
15358  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
15359  * dst.data += start * stride
15360  * else:
15361  */
15362  __Pyx_TraceLine(891,1,__PYX_ERR(1, 891, __pyx_L1_error))
15363  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
15364  if (__pyx_t_2) {
15365 
15366  /* "View.MemoryView":892
15367  *
15368  * if suboffset_dim[0] < 0:
15369  * dst.data += start * stride # <<<<<<<<<<<<<<
15370  * else:
15371  * dst.suboffsets[suboffset_dim[0]] += start * stride
15372  */
15373  __Pyx_TraceLine(892,1,__PYX_ERR(1, 892, __pyx_L1_error))
15374  __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
15375 
15376  /* "View.MemoryView":891
15377  *
15378  *
15379  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
15380  * dst.data += start * stride
15381  * else:
15382  */
15383  goto __pyx_L23;
15384  }
15385 
15386  /* "View.MemoryView":894
15387  * dst.data += start * stride
15388  * else:
15389  * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<<
15390  *
15391  * if suboffset >= 0:
15392  */
15393  __Pyx_TraceLine(894,1,__PYX_ERR(1, 894, __pyx_L1_error))
15394  /*else*/ {
15395  __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
15396  (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
15397  }
15398  __pyx_L23:;
15399 
15400  /* "View.MemoryView":896
15401  * dst.suboffsets[suboffset_dim[0]] += start * stride
15402  *
15403  * if suboffset >= 0: # <<<<<<<<<<<<<<
15404  * if not is_slice:
15405  * if new_ndim == 0:
15406  */
15407  __Pyx_TraceLine(896,1,__PYX_ERR(1, 896, __pyx_L1_error))
15408  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
15409  if (__pyx_t_2) {
15410 
15411  /* "View.MemoryView":897
15412  *
15413  * if suboffset >= 0:
15414  * if not is_slice: # <<<<<<<<<<<<<<
15415  * if new_ndim == 0:
15416  * dst.data = (<char **> dst.data)[0] + suboffset
15417  */
15418  __Pyx_TraceLine(897,1,__PYX_ERR(1, 897, __pyx_L1_error))
15419  __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
15420  if (__pyx_t_2) {
15421 
15422  /* "View.MemoryView":898
15423  * if suboffset >= 0:
15424  * if not is_slice:
15425  * if new_ndim == 0: # <<<<<<<<<<<<<<
15426  * dst.data = (<char **> dst.data)[0] + suboffset
15427  * else:
15428  */
15429  __Pyx_TraceLine(898,1,__PYX_ERR(1, 898, __pyx_L1_error))
15430  __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
15431  if (__pyx_t_2) {
15432 
15433  /* "View.MemoryView":899
15434  * if not is_slice:
15435  * if new_ndim == 0:
15436  * dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<<
15437  * else:
15438  * _err_dim(IndexError, "All dimensions preceding dimension %d "
15439  */
15440  __Pyx_TraceLine(899,1,__PYX_ERR(1, 899, __pyx_L1_error))
15441  __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
15442 
15443  /* "View.MemoryView":898
15444  * if suboffset >= 0:
15445  * if not is_slice:
15446  * if new_ndim == 0: # <<<<<<<<<<<<<<
15447  * dst.data = (<char **> dst.data)[0] + suboffset
15448  * else:
15449  */
15450  goto __pyx_L26;
15451  }
15452 
15453  /* "View.MemoryView":901
15454  * dst.data = (<char **> dst.data)[0] + suboffset
15455  * else:
15456  * _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<<
15457  * "must be indexed and not sliced", dim)
15458  * else:
15459  */
15460  __Pyx_TraceLine(901,1,__PYX_ERR(1, 901, __pyx_L1_error))
15461  /*else*/ {
15462 
15463  /* "View.MemoryView":902
15464  * else:
15465  * _err_dim(IndexError, "All dimensions preceding dimension %d "
15466  * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<<
15467  * else:
15468  * suboffset_dim[0] = new_ndim
15469  */
15470  __Pyx_TraceLine(902,1,__PYX_ERR(1, 902, __pyx_L1_error))
15471  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 901, __pyx_L1_error)
15472  }
15473  __pyx_L26:;
15474 
15475  /* "View.MemoryView":897
15476  *
15477  * if suboffset >= 0:
15478  * if not is_slice: # <<<<<<<<<<<<<<
15479  * if new_ndim == 0:
15480  * dst.data = (<char **> dst.data)[0] + suboffset
15481  */
15482  goto __pyx_L25;
15483  }
15484 
15485  /* "View.MemoryView":904
15486  * "must be indexed and not sliced", dim)
15487  * else:
15488  * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<<
15489  *
15490  * return 0
15491  */
15492  __Pyx_TraceLine(904,1,__PYX_ERR(1, 904, __pyx_L1_error))
15493  /*else*/ {
15494  (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
15495  }
15496  __pyx_L25:;
15497 
15498  /* "View.MemoryView":896
15499  * dst.suboffsets[suboffset_dim[0]] += start * stride
15500  *
15501  * if suboffset >= 0: # <<<<<<<<<<<<<<
15502  * if not is_slice:
15503  * if new_ndim == 0:
15504  */
15505  }
15506 
15507  /* "View.MemoryView":906
15508  * suboffset_dim[0] = new_ndim
15509  *
15510  * return 0 # <<<<<<<<<<<<<<
15511  *
15512  *
15513  */
15514  __Pyx_TraceLine(906,1,__PYX_ERR(1, 906, __pyx_L1_error))
15515  __pyx_r = 0;
15516  goto __pyx_L0;
15517 
15518  /* "View.MemoryView":809
15519  *
15520  * @cname('__pyx_memoryview_slice_memviewslice')
15521  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
15522  * __Pyx_memviewslice *dst,
15523  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
15524  */
15525 
15526  /* function exit code */
15527  __pyx_L1_error:;
15528  {
15529  #ifdef WITH_THREAD
15530  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
15531  #endif
15532  __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
15533  #ifdef WITH_THREAD
15534  __Pyx_PyGILState_Release(__pyx_gilstate_save);
15535  #endif
15536  }
15537  __pyx_r = -1;
15538  __pyx_L0:;
15539  __Pyx_TraceReturn(Py_None, 1);
15540  return __pyx_r;
15541 }
15542 
15543 /* "View.MemoryView":912
15544  *
15545  * @cname('__pyx_pybuffer_index')
15546  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
15547  * Py_ssize_t dim) except NULL:
15548  * cdef Py_ssize_t shape, stride, suboffset = -1
15549  */
15550 
15551 static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
15552  Py_ssize_t __pyx_v_shape;
15553  Py_ssize_t __pyx_v_stride;
15554  Py_ssize_t __pyx_v_suboffset;
15555  Py_ssize_t __pyx_v_itemsize;
15556  char *__pyx_v_resultp;
15557  char *__pyx_r;
15558  __Pyx_TraceDeclarations
15559  __Pyx_RefNannyDeclarations
15560  Py_ssize_t __pyx_t_1;
15561  int __pyx_t_2;
15562  PyObject *__pyx_t_3 = NULL;
15563  PyObject *__pyx_t_4 = NULL;
15564  int __pyx_lineno = 0;
15565  const char *__pyx_filename = NULL;
15566  int __pyx_clineno = 0;
15567  __Pyx_RefNannySetupContext("pybuffer_index", 0);
15568  __Pyx_TraceCall("pybuffer_index", __pyx_f[1], 912, 0, __PYX_ERR(1, 912, __pyx_L1_error));
15569 
15570  /* "View.MemoryView":914
15571  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
15572  * Py_ssize_t dim) except NULL:
15573  * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
15574  * cdef Py_ssize_t itemsize = view.itemsize
15575  * cdef char *resultp
15576  */
15577  __Pyx_TraceLine(914,0,__PYX_ERR(1, 914, __pyx_L1_error))
15578  __pyx_v_suboffset = -1L;
15579 
15580  /* "View.MemoryView":915
15581  * Py_ssize_t dim) except NULL:
15582  * cdef Py_ssize_t shape, stride, suboffset = -1
15583  * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
15584  * cdef char *resultp
15585  *
15586  */
15587  __Pyx_TraceLine(915,0,__PYX_ERR(1, 915, __pyx_L1_error))
15588  __pyx_t_1 = __pyx_v_view->itemsize;
15589  __pyx_v_itemsize = __pyx_t_1;
15590 
15591  /* "View.MemoryView":918
15592  * cdef char *resultp
15593  *
15594  * if view.ndim == 0: # <<<<<<<<<<<<<<
15595  * shape = view.len / itemsize
15596  * stride = itemsize
15597  */
15598  __Pyx_TraceLine(918,0,__PYX_ERR(1, 918, __pyx_L1_error))
15599  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
15600  if (__pyx_t_2) {
15601 
15602  /* "View.MemoryView":919
15603  *
15604  * if view.ndim == 0:
15605  * shape = view.len / itemsize # <<<<<<<<<<<<<<
15606  * stride = itemsize
15607  * else:
15608  */
15609  __Pyx_TraceLine(919,0,__PYX_ERR(1, 919, __pyx_L1_error))
15610  if (unlikely(__pyx_v_itemsize == 0)) {
15611  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
15612  __PYX_ERR(1, 919, __pyx_L1_error)
15613  }
15614  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
15615  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
15616  __PYX_ERR(1, 919, __pyx_L1_error)
15617  }
15618  __pyx_v_shape = (__pyx_v_view->len / __pyx_v_itemsize);
15619 
15620  /* "View.MemoryView":920
15621  * if view.ndim == 0:
15622  * shape = view.len / itemsize
15623  * stride = itemsize # <<<<<<<<<<<<<<
15624  * else:
15625  * shape = view.shape[dim]
15626  */
15627  __Pyx_TraceLine(920,0,__PYX_ERR(1, 920, __pyx_L1_error))
15628  __pyx_v_stride = __pyx_v_itemsize;
15629 
15630  /* "View.MemoryView":918
15631  * cdef char *resultp
15632  *
15633  * if view.ndim == 0: # <<<<<<<<<<<<<<
15634  * shape = view.len / itemsize
15635  * stride = itemsize
15636  */
15637  goto __pyx_L3;
15638  }
15639 
15640  /* "View.MemoryView":922
15641  * stride = itemsize
15642  * else:
15643  * shape = view.shape[dim] # <<<<<<<<<<<<<<
15644  * stride = view.strides[dim]
15645  * if view.suboffsets != NULL:
15646  */
15647  __Pyx_TraceLine(922,0,__PYX_ERR(1, 922, __pyx_L1_error))
15648  /*else*/ {
15649  __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
15650 
15651  /* "View.MemoryView":923
15652  * else:
15653  * shape = view.shape[dim]
15654  * stride = view.strides[dim] # <<<<<<<<<<<<<<
15655  * if view.suboffsets != NULL:
15656  * suboffset = view.suboffsets[dim]
15657  */
15658  __Pyx_TraceLine(923,0,__PYX_ERR(1, 923, __pyx_L1_error))
15659  __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
15660 
15661  /* "View.MemoryView":924
15662  * shape = view.shape[dim]
15663  * stride = view.strides[dim]
15664  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
15665  * suboffset = view.suboffsets[dim]
15666  *
15667  */
15668  __Pyx_TraceLine(924,0,__PYX_ERR(1, 924, __pyx_L1_error))
15669  __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
15670  if (__pyx_t_2) {
15671 
15672  /* "View.MemoryView":925
15673  * stride = view.strides[dim]
15674  * if view.suboffsets != NULL:
15675  * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
15676  *
15677  * if index < 0:
15678  */
15679  __Pyx_TraceLine(925,0,__PYX_ERR(1, 925, __pyx_L1_error))
15680  __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
15681 
15682  /* "View.MemoryView":924
15683  * shape = view.shape[dim]
15684  * stride = view.strides[dim]
15685  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
15686  * suboffset = view.suboffsets[dim]
15687  *
15688  */
15689  }
15690  }
15691  __pyx_L3:;
15692 
15693  /* "View.MemoryView":927
15694  * suboffset = view.suboffsets[dim]
15695  *
15696  * if index < 0: # <<<<<<<<<<<<<<
15697  * index += view.shape[dim]
15698  * if index < 0:
15699  */
15700  __Pyx_TraceLine(927,0,__PYX_ERR(1, 927, __pyx_L1_error))
15701  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
15702  if (__pyx_t_2) {
15703 
15704  /* "View.MemoryView":928
15705  *
15706  * if index < 0:
15707  * index += view.shape[dim] # <<<<<<<<<<<<<<
15708  * if index < 0:
15709  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15710  */
15711  __Pyx_TraceLine(928,0,__PYX_ERR(1, 928, __pyx_L1_error))
15712  __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
15713 
15714  /* "View.MemoryView":929
15715  * if index < 0:
15716  * index += view.shape[dim]
15717  * if index < 0: # <<<<<<<<<<<<<<
15718  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15719  *
15720  */
15721  __Pyx_TraceLine(929,0,__PYX_ERR(1, 929, __pyx_L1_error))
15722  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
15723  if (unlikely(__pyx_t_2)) {
15724 
15725  /* "View.MemoryView":930
15726  * index += view.shape[dim]
15727  * if index < 0:
15728  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
15729  *
15730  * if index >= shape:
15731  */
15732  __Pyx_TraceLine(930,0,__PYX_ERR(1, 930, __pyx_L1_error))
15733  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 930, __pyx_L1_error)
15734  __Pyx_GOTREF(__pyx_t_3);
15735  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 930, __pyx_L1_error)
15736  __Pyx_GOTREF(__pyx_t_4);
15737  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15738  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 930, __pyx_L1_error)
15739  __Pyx_GOTREF(__pyx_t_3);
15740  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15741  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
15742  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15743  __PYX_ERR(1, 930, __pyx_L1_error)
15744 
15745  /* "View.MemoryView":929
15746  * if index < 0:
15747  * index += view.shape[dim]
15748  * if index < 0: # <<<<<<<<<<<<<<
15749  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15750  *
15751  */
15752  }
15753 
15754  /* "View.MemoryView":927
15755  * suboffset = view.suboffsets[dim]
15756  *
15757  * if index < 0: # <<<<<<<<<<<<<<
15758  * index += view.shape[dim]
15759  * if index < 0:
15760  */
15761  }
15762 
15763  /* "View.MemoryView":932
15764  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15765  *
15766  * if index >= shape: # <<<<<<<<<<<<<<
15767  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15768  *
15769  */
15770  __Pyx_TraceLine(932,0,__PYX_ERR(1, 932, __pyx_L1_error))
15771  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
15772  if (unlikely(__pyx_t_2)) {
15773 
15774  /* "View.MemoryView":933
15775  *
15776  * if index >= shape:
15777  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
15778  *
15779  * resultp = bufp + index * stride
15780  */
15781  __Pyx_TraceLine(933,0,__PYX_ERR(1, 933, __pyx_L1_error))
15782  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 933, __pyx_L1_error)
15783  __Pyx_GOTREF(__pyx_t_3);
15784  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 933, __pyx_L1_error)
15785  __Pyx_GOTREF(__pyx_t_4);
15786  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15787  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 933, __pyx_L1_error)
15788  __Pyx_GOTREF(__pyx_t_3);
15789  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15790  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
15791  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15792  __PYX_ERR(1, 933, __pyx_L1_error)
15793 
15794  /* "View.MemoryView":932
15795  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15796  *
15797  * if index >= shape: # <<<<<<<<<<<<<<
15798  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15799  *
15800  */
15801  }
15802 
15803  /* "View.MemoryView":935
15804  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15805  *
15806  * resultp = bufp + index * stride # <<<<<<<<<<<<<<
15807  * if suboffset >= 0:
15808  * resultp = (<char **> resultp)[0] + suboffset
15809  */
15810  __Pyx_TraceLine(935,0,__PYX_ERR(1, 935, __pyx_L1_error))
15811  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
15812 
15813  /* "View.MemoryView":936
15814  *
15815  * resultp = bufp + index * stride
15816  * if suboffset >= 0: # <<<<<<<<<<<<<<
15817  * resultp = (<char **> resultp)[0] + suboffset
15818  *
15819  */
15820  __Pyx_TraceLine(936,0,__PYX_ERR(1, 936, __pyx_L1_error))
15821  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
15822  if (__pyx_t_2) {
15823 
15824  /* "View.MemoryView":937
15825  * resultp = bufp + index * stride
15826  * if suboffset >= 0:
15827  * resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
15828  *
15829  * return resultp
15830  */
15831  __Pyx_TraceLine(937,0,__PYX_ERR(1, 937, __pyx_L1_error))
15832  __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
15833 
15834  /* "View.MemoryView":936
15835  *
15836  * resultp = bufp + index * stride
15837  * if suboffset >= 0: # <<<<<<<<<<<<<<
15838  * resultp = (<char **> resultp)[0] + suboffset
15839  *
15840  */
15841  }
15842 
15843  /* "View.MemoryView":939
15844  * resultp = (<char **> resultp)[0] + suboffset
15845  *
15846  * return resultp # <<<<<<<<<<<<<<
15847  *
15848  *
15849  */
15850  __Pyx_TraceLine(939,0,__PYX_ERR(1, 939, __pyx_L1_error))
15851  __pyx_r = __pyx_v_resultp;
15852  goto __pyx_L0;
15853 
15854  /* "View.MemoryView":912
15855  *
15856  * @cname('__pyx_pybuffer_index')
15857  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
15858  * Py_ssize_t dim) except NULL:
15859  * cdef Py_ssize_t shape, stride, suboffset = -1
15860  */
15861 
15862  /* function exit code */
15863  __pyx_L1_error:;
15864  __Pyx_XDECREF(__pyx_t_3);
15865  __Pyx_XDECREF(__pyx_t_4);
15866  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
15867  __pyx_r = NULL;
15868  __pyx_L0:;
15869  __Pyx_TraceReturn(Py_None, 0);
15870  __Pyx_RefNannyFinishContext();
15871  return __pyx_r;
15872 }
15873 
15874 /* "View.MemoryView":945
15875  *
15876  * @cname('__pyx_memslice_transpose')
15877  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
15878  * cdef int ndim = memslice.memview.view.ndim
15879  *
15880  */
15881 
15882 static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
15883  int __pyx_v_ndim;
15884  Py_ssize_t *__pyx_v_shape;
15885  Py_ssize_t *__pyx_v_strides;
15886  int __pyx_v_i;
15887  int __pyx_v_j;
15888  int __pyx_r;
15889  __Pyx_TraceDeclarations
15890  int __pyx_t_1;
15891  Py_ssize_t *__pyx_t_2;
15892  long __pyx_t_3;
15893  long __pyx_t_4;
15894  Py_ssize_t __pyx_t_5;
15895  Py_ssize_t __pyx_t_6;
15896  int __pyx_t_7;
15897  int __pyx_t_8;
15898  int __pyx_t_9;
15899  int __pyx_lineno = 0;
15900  const char *__pyx_filename = NULL;
15901  int __pyx_clineno = 0;
15902  __Pyx_TraceCall("transpose_memslice", __pyx_f[1], 945, 1, __PYX_ERR(1, 945, __pyx_L1_error));
15903 
15904  /* "View.MemoryView":946
15905  * @cname('__pyx_memslice_transpose')
15906  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
15907  * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
15908  *
15909  * cdef Py_ssize_t *shape = memslice.shape
15910  */
15911  __Pyx_TraceLine(946,1,__PYX_ERR(1, 946, __pyx_L1_error))
15912  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
15913  __pyx_v_ndim = __pyx_t_1;
15914 
15915  /* "View.MemoryView":948
15916  * cdef int ndim = memslice.memview.view.ndim
15917  *
15918  * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
15919  * cdef Py_ssize_t *strides = memslice.strides
15920  *
15921  */
15922  __Pyx_TraceLine(948,1,__PYX_ERR(1, 948, __pyx_L1_error))
15923  __pyx_t_2 = __pyx_v_memslice->shape;
15924  __pyx_v_shape = __pyx_t_2;
15925 
15926  /* "View.MemoryView":949
15927  *
15928  * cdef Py_ssize_t *shape = memslice.shape
15929  * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
15930  *
15931  *
15932  */
15933  __Pyx_TraceLine(949,1,__PYX_ERR(1, 949, __pyx_L1_error))
15934  __pyx_t_2 = __pyx_v_memslice->strides;
15935  __pyx_v_strides = __pyx_t_2;
15936 
15937  /* "View.MemoryView":953
15938  *
15939  * cdef int i, j
15940  * for i in range(ndim / 2): # <<<<<<<<<<<<<<
15941  * j = ndim - 1 - i
15942  * strides[i], strides[j] = strides[j], strides[i]
15943  */
15944  __Pyx_TraceLine(953,1,__PYX_ERR(1, 953, __pyx_L1_error))
15945  __pyx_t_3 = (__pyx_v_ndim / 2);
15946  __pyx_t_4 = __pyx_t_3;
15947  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
15948  __pyx_v_i = __pyx_t_1;
15949 
15950  /* "View.MemoryView":954
15951  * cdef int i, j
15952  * for i in range(ndim / 2):
15953  * j = ndim - 1 - i # <<<<<<<<<<<<<<
15954  * strides[i], strides[j] = strides[j], strides[i]
15955  * shape[i], shape[j] = shape[j], shape[i]
15956  */
15957  __Pyx_TraceLine(954,1,__PYX_ERR(1, 954, __pyx_L1_error))
15958  __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
15959 
15960  /* "View.MemoryView":955
15961  * for i in range(ndim / 2):
15962  * j = ndim - 1 - i
15963  * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
15964  * shape[i], shape[j] = shape[j], shape[i]
15965  *
15966  */
15967  __Pyx_TraceLine(955,1,__PYX_ERR(1, 955, __pyx_L1_error))
15968  __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
15969  __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
15970  (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
15971  (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
15972 
15973  /* "View.MemoryView":956
15974  * j = ndim - 1 - i
15975  * strides[i], strides[j] = strides[j], strides[i]
15976  * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
15977  *
15978  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
15979  */
15980  __Pyx_TraceLine(956,1,__PYX_ERR(1, 956, __pyx_L1_error))
15981  __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
15982  __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
15983  (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
15984  (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
15985 
15986  /* "View.MemoryView":958
15987  * shape[i], shape[j] = shape[j], shape[i]
15988  *
15989  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
15990  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
15991  *
15992  */
15993  __Pyx_TraceLine(958,1,__PYX_ERR(1, 958, __pyx_L1_error))
15994  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
15995  if (!__pyx_t_8) {
15996  } else {
15997  __pyx_t_7 = __pyx_t_8;
15998  goto __pyx_L6_bool_binop_done;
15999  }
16000  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
16001  __pyx_t_7 = __pyx_t_8;
16002  __pyx_L6_bool_binop_done:;
16003  if (__pyx_t_7) {
16004 
16005  /* "View.MemoryView":959
16006  *
16007  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
16008  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
16009  *
16010  * return 1
16011  */
16012  __Pyx_TraceLine(959,1,__PYX_ERR(1, 959, __pyx_L1_error))
16013  __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 959, __pyx_L1_error)
16014 
16015  /* "View.MemoryView":958
16016  * shape[i], shape[j] = shape[j], shape[i]
16017  *
16018  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
16019  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
16020  *
16021  */
16022  }
16023  }
16024 
16025  /* "View.MemoryView":961
16026  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
16027  *
16028  * return 1 # <<<<<<<<<<<<<<
16029  *
16030  *
16031  */
16032  __Pyx_TraceLine(961,1,__PYX_ERR(1, 961, __pyx_L1_error))
16033  __pyx_r = 1;
16034  goto __pyx_L0;
16035 
16036  /* "View.MemoryView":945
16037  *
16038  * @cname('__pyx_memslice_transpose')
16039  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
16040  * cdef int ndim = memslice.memview.view.ndim
16041  *
16042  */
16043 
16044  /* function exit code */
16045  __pyx_L1_error:;
16046  {
16047  #ifdef WITH_THREAD
16048  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
16049  #endif
16050  __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
16051  #ifdef WITH_THREAD
16052  __Pyx_PyGILState_Release(__pyx_gilstate_save);
16053  #endif
16054  }
16055  __pyx_r = 0;
16056  __pyx_L0:;
16057  __Pyx_TraceReturn(Py_None, 1);
16058  return __pyx_r;
16059 }
16060 
16061 /* "View.MemoryView":978
16062  * cdef int (*to_dtype_func)(char *, object) except 0
16063  *
16064  * def __dealloc__(self): # <<<<<<<<<<<<<<
16065  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
16066  *
16067  */
16068 
16069 /* Python wrapper */
16070 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
16071 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
16072  __Pyx_RefNannyDeclarations
16073  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
16074  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
16075 
16076  /* function exit code */
16077  __Pyx_RefNannyFinishContext();
16078 }
16079 
16080 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
16081  __Pyx_TraceDeclarations
16082  __Pyx_RefNannyDeclarations
16083  int __pyx_lineno = 0;
16084  const char *__pyx_filename = NULL;
16085  int __pyx_clineno = 0;
16086  __Pyx_RefNannySetupContext("__dealloc__", 0);
16087  __Pyx_TraceCall("__dealloc__", __pyx_f[1], 978, 0, __PYX_ERR(1, 978, __pyx_L1_error));
16088 
16089  /* "View.MemoryView":979
16090  *
16091  * def __dealloc__(self):
16092  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
16093  *
16094  * cdef convert_item_to_object(self, char *itemp):
16095  */
16096  __Pyx_TraceLine(979,0,__PYX_ERR(1, 979, __pyx_L1_error))
16097  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
16098 
16099  /* "View.MemoryView":978
16100  * cdef int (*to_dtype_func)(char *, object) except 0
16101  *
16102  * def __dealloc__(self): # <<<<<<<<<<<<<<
16103  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
16104  *
16105  */
16106 
16107  /* function exit code */
16108  goto __pyx_L0;
16109  __pyx_L1_error:;
16110  __Pyx_WriteUnraisable("View.MemoryView._memoryviewslice.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
16111  __pyx_L0:;
16112  __Pyx_TraceReturn(Py_None, 0);
16113  __Pyx_RefNannyFinishContext();
16114 }
16115 
16116 /* "View.MemoryView":981
16117  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
16118  *
16119  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
16120  * if self.to_object_func != NULL:
16121  * return self.to_object_func(itemp)
16122  */
16123 
16124 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
16125  PyObject *__pyx_r = NULL;
16126  __Pyx_TraceDeclarations
16127  __Pyx_RefNannyDeclarations
16128  int __pyx_t_1;
16129  PyObject *__pyx_t_2 = NULL;
16130  int __pyx_lineno = 0;
16131  const char *__pyx_filename = NULL;
16132  int __pyx_clineno = 0;
16133  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
16134  __Pyx_TraceCall("convert_item_to_object", __pyx_f[1], 981, 0, __PYX_ERR(1, 981, __pyx_L1_error));
16135 
16136  /* "View.MemoryView":982
16137  *
16138  * cdef convert_item_to_object(self, char *itemp):
16139  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
16140  * return self.to_object_func(itemp)
16141  * else:
16142  */
16143  __Pyx_TraceLine(982,0,__PYX_ERR(1, 982, __pyx_L1_error))
16144  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
16145  if (__pyx_t_1) {
16146 
16147  /* "View.MemoryView":983
16148  * cdef convert_item_to_object(self, char *itemp):
16149  * if self.to_object_func != NULL:
16150  * return self.to_object_func(itemp) # <<<<<<<<<<<<<<
16151  * else:
16152  * return memoryview.convert_item_to_object(self, itemp)
16153  */
16154  __Pyx_TraceLine(983,0,__PYX_ERR(1, 983, __pyx_L1_error))
16155  __Pyx_XDECREF(__pyx_r);
16156  __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 983, __pyx_L1_error)
16157  __Pyx_GOTREF(__pyx_t_2);
16158  __pyx_r = __pyx_t_2;
16159  __pyx_t_2 = 0;
16160  goto __pyx_L0;
16161 
16162  /* "View.MemoryView":982
16163  *
16164  * cdef convert_item_to_object(self, char *itemp):
16165  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
16166  * return self.to_object_func(itemp)
16167  * else:
16168  */
16169  }
16170 
16171  /* "View.MemoryView":985
16172  * return self.to_object_func(itemp)
16173  * else:
16174  * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
16175  *
16176  * cdef assign_item_from_object(self, char *itemp, object value):
16177  */
16178  __Pyx_TraceLine(985,0,__PYX_ERR(1, 985, __pyx_L1_error))
16179  /*else*/ {
16180  __Pyx_XDECREF(__pyx_r);
16181  __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 985, __pyx_L1_error)
16182  __Pyx_GOTREF(__pyx_t_2);
16183  __pyx_r = __pyx_t_2;
16184  __pyx_t_2 = 0;
16185  goto __pyx_L0;
16186  }
16187 
16188  /* "View.MemoryView":981
16189  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
16190  *
16191  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
16192  * if self.to_object_func != NULL:
16193  * return self.to_object_func(itemp)
16194  */
16195 
16196  /* function exit code */
16197  __pyx_L1_error:;
16198  __Pyx_XDECREF(__pyx_t_2);
16199  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
16200  __pyx_r = 0;
16201  __pyx_L0:;
16202  __Pyx_XGIVEREF(__pyx_r);
16203  __Pyx_TraceReturn(__pyx_r, 0);
16204  __Pyx_RefNannyFinishContext();
16205  return __pyx_r;
16206 }
16207 
16208 /* "View.MemoryView":987
16209  * return memoryview.convert_item_to_object(self, itemp)
16210  *
16211  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
16212  * if self.to_dtype_func != NULL:
16213  * self.to_dtype_func(itemp, value)
16214  */
16215 
16216 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
16217  PyObject *__pyx_r = NULL;
16218  __Pyx_TraceDeclarations
16219  __Pyx_RefNannyDeclarations
16220  int __pyx_t_1;
16221  int __pyx_t_2;
16222  PyObject *__pyx_t_3 = NULL;
16223  int __pyx_lineno = 0;
16224  const char *__pyx_filename = NULL;
16225  int __pyx_clineno = 0;
16226  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
16227  __Pyx_TraceCall("assign_item_from_object", __pyx_f[1], 987, 0, __PYX_ERR(1, 987, __pyx_L1_error));
16228 
16229  /* "View.MemoryView":988
16230  *
16231  * cdef assign_item_from_object(self, char *itemp, object value):
16232  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
16233  * self.to_dtype_func(itemp, value)
16234  * else:
16235  */
16236  __Pyx_TraceLine(988,0,__PYX_ERR(1, 988, __pyx_L1_error))
16237  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
16238  if (__pyx_t_1) {
16239 
16240  /* "View.MemoryView":989
16241  * cdef assign_item_from_object(self, char *itemp, object value):
16242  * if self.to_dtype_func != NULL:
16243  * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
16244  * else:
16245  * memoryview.assign_item_from_object(self, itemp, value)
16246  */
16247  __Pyx_TraceLine(989,0,__PYX_ERR(1, 989, __pyx_L1_error))
16248  __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 989, __pyx_L1_error)
16249 
16250  /* "View.MemoryView":988
16251  *
16252  * cdef assign_item_from_object(self, char *itemp, object value):
16253  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
16254  * self.to_dtype_func(itemp, value)
16255  * else:
16256  */
16257  goto __pyx_L3;
16258  }
16259 
16260  /* "View.MemoryView":991
16261  * self.to_dtype_func(itemp, value)
16262  * else:
16263  * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
16264  *
16265  * @property
16266  */
16267  __Pyx_TraceLine(991,0,__PYX_ERR(1, 991, __pyx_L1_error))
16268  /*else*/ {
16269  __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 991, __pyx_L1_error)
16270  __Pyx_GOTREF(__pyx_t_3);
16271  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16272  }
16273  __pyx_L3:;
16274 
16275  /* "View.MemoryView":987
16276  * return memoryview.convert_item_to_object(self, itemp)
16277  *
16278  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
16279  * if self.to_dtype_func != NULL:
16280  * self.to_dtype_func(itemp, value)
16281  */
16282 
16283  /* function exit code */
16284  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16285  goto __pyx_L0;
16286  __pyx_L1_error:;
16287  __Pyx_XDECREF(__pyx_t_3);
16288  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
16289  __pyx_r = 0;
16290  __pyx_L0:;
16291  __Pyx_XGIVEREF(__pyx_r);
16292  __Pyx_TraceReturn(__pyx_r, 0);
16293  __Pyx_RefNannyFinishContext();
16294  return __pyx_r;
16295 }
16296 
16297 /* "View.MemoryView":994
16298  *
16299  * @property
16300  * def base(self): # <<<<<<<<<<<<<<
16301  * return self.from_object
16302  *
16303  */
16304 
16305 /* Python wrapper */
16306 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
16307 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
16308  PyObject *__pyx_r = 0;
16309  __Pyx_RefNannyDeclarations
16310  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
16311  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
16312 
16313  /* function exit code */
16314  __Pyx_RefNannyFinishContext();
16315  return __pyx_r;
16316 }
16317 
16318 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
16319  PyObject *__pyx_r = NULL;
16320  __Pyx_TraceDeclarations
16321  __Pyx_RefNannyDeclarations
16322  int __pyx_lineno = 0;
16323  const char *__pyx_filename = NULL;
16324  int __pyx_clineno = 0;
16325  __Pyx_RefNannySetupContext("__get__", 0);
16326  __Pyx_TraceCall("__get__", __pyx_f[1], 994, 0, __PYX_ERR(1, 994, __pyx_L1_error));
16327 
16328  /* "View.MemoryView":995
16329  * @property
16330  * def base(self):
16331  * return self.from_object # <<<<<<<<<<<<<<
16332  *
16333  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
16334  */
16335  __Pyx_TraceLine(995,0,__PYX_ERR(1, 995, __pyx_L1_error))
16336  __Pyx_XDECREF(__pyx_r);
16337  __Pyx_INCREF(__pyx_v_self->from_object);
16338  __pyx_r = __pyx_v_self->from_object;
16339  goto __pyx_L0;
16340 
16341  /* "View.MemoryView":994
16342  *
16343  * @property
16344  * def base(self): # <<<<<<<<<<<<<<
16345  * return self.from_object
16346  *
16347  */
16348 
16349  /* function exit code */
16350  __pyx_L1_error:;
16351  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16352  __pyx_r = NULL;
16353  __pyx_L0:;
16354  __Pyx_XGIVEREF(__pyx_r);
16355  __Pyx_TraceReturn(__pyx_r, 0);
16356  __Pyx_RefNannyFinishContext();
16357  return __pyx_r;
16358 }
16359 
16360 /* "(tree fragment)":1
16361  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
16362  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16363  * def __setstate_cython__(self, __pyx_state):
16364  */
16365 
16366 /* Python wrapper */
16367 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
16368 static PyMethodDef __pyx_mdef___pyx_memoryviewslice_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0};
16369 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
16370  PyObject *__pyx_r = 0;
16371  __Pyx_RefNannyDeclarations
16372  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
16373  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
16374 
16375  /* function exit code */
16376  __Pyx_RefNannyFinishContext();
16377  return __pyx_r;
16378 }
16379 
16380 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
16381  PyObject *__pyx_r = NULL;
16382  __Pyx_TraceDeclarations
16383  __Pyx_RefNannyDeclarations
16384  PyObject *__pyx_t_1 = NULL;
16385  int __pyx_lineno = 0;
16386  const char *__pyx_filename = NULL;
16387  int __pyx_clineno = 0;
16388  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
16389  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
16390 
16391  /* "(tree fragment)":2
16392  * def __reduce_cython__(self):
16393  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
16394  * def __setstate_cython__(self, __pyx_state):
16395  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16396  */
16397  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
16398  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
16399  __Pyx_GOTREF(__pyx_t_1);
16400  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
16401  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16402  __PYX_ERR(1, 2, __pyx_L1_error)
16403 
16404  /* "(tree fragment)":1
16405  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
16406  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16407  * def __setstate_cython__(self, __pyx_state):
16408  */
16409 
16410  /* function exit code */
16411  __pyx_L1_error:;
16412  __Pyx_XDECREF(__pyx_t_1);
16413  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16414  __pyx_r = NULL;
16415  __Pyx_XGIVEREF(__pyx_r);
16416  __Pyx_TraceReturn(__pyx_r, 0);
16417  __Pyx_RefNannyFinishContext();
16418  return __pyx_r;
16419 }
16420 
16421 /* "(tree fragment)":3
16422  * def __reduce_cython__(self):
16423  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16424  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
16425  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16426  */
16427 
16428 /* Python wrapper */
16429 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
16430 static PyMethodDef __pyx_mdef___pyx_memoryviewslice_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0};
16431 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
16432  PyObject *__pyx_r = 0;
16433  __Pyx_RefNannyDeclarations
16434  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
16435  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
16436 
16437  /* function exit code */
16438  __Pyx_RefNannyFinishContext();
16439  return __pyx_r;
16440 }
16441 
16442 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
16443  PyObject *__pyx_r = NULL;
16444  __Pyx_TraceDeclarations
16445  __Pyx_RefNannyDeclarations
16446  PyObject *__pyx_t_1 = NULL;
16447  int __pyx_lineno = 0;
16448  const char *__pyx_filename = NULL;
16449  int __pyx_clineno = 0;
16450  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
16451  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
16452 
16453  /* "(tree fragment)":4
16454  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16455  * def __setstate_cython__(self, __pyx_state):
16456  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
16457  */
16458  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
16459  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
16460  __Pyx_GOTREF(__pyx_t_1);
16461  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
16462  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16463  __PYX_ERR(1, 4, __pyx_L1_error)
16464 
16465  /* "(tree fragment)":3
16466  * def __reduce_cython__(self):
16467  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16468  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
16469  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16470  */
16471 
16472  /* function exit code */
16473  __pyx_L1_error:;
16474  __Pyx_XDECREF(__pyx_t_1);
16475  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16476  __pyx_r = NULL;
16477  __Pyx_XGIVEREF(__pyx_r);
16478  __Pyx_TraceReturn(__pyx_r, 0);
16479  __Pyx_RefNannyFinishContext();
16480  return __pyx_r;
16481 }
16482 
16483 /* "View.MemoryView":1001
16484  *
16485  * @cname('__pyx_memoryview_fromslice')
16486  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
16487  * int ndim,
16488  * object (*to_object_func)(char *),
16489  */
16490 
16491 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
16492  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
16493  Py_ssize_t __pyx_v_suboffset;
16494  PyObject *__pyx_v_length = NULL;
16495  PyObject *__pyx_r = NULL;
16496  __Pyx_TraceDeclarations
16497  __Pyx_RefNannyDeclarations
16498  int __pyx_t_1;
16499  PyObject *__pyx_t_2 = NULL;
16500  PyObject *__pyx_t_3 = NULL;
16501  __Pyx_TypeInfo *__pyx_t_4;
16502  Py_buffer __pyx_t_5;
16503  Py_ssize_t *__pyx_t_6;
16504  Py_ssize_t *__pyx_t_7;
16505  Py_ssize_t *__pyx_t_8;
16506  Py_ssize_t __pyx_t_9;
16507  int __pyx_lineno = 0;
16508  const char *__pyx_filename = NULL;
16509  int __pyx_clineno = 0;
16510  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
16511  __Pyx_TraceCall("memoryview_fromslice", __pyx_f[1], 1001, 0, __PYX_ERR(1, 1001, __pyx_L1_error));
16512 
16513  /* "View.MemoryView":1009
16514  * cdef _memoryviewslice result
16515  *
16516  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
16517  * return None
16518  *
16519  */
16520  __Pyx_TraceLine(1009,0,__PYX_ERR(1, 1009, __pyx_L1_error))
16521  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
16522  if (__pyx_t_1) {
16523 
16524  /* "View.MemoryView":1010
16525  *
16526  * if <PyObject *> memviewslice.memview == Py_None:
16527  * return None # <<<<<<<<<<<<<<
16528  *
16529  *
16530  */
16531  __Pyx_TraceLine(1010,0,__PYX_ERR(1, 1010, __pyx_L1_error))
16532  __Pyx_XDECREF(__pyx_r);
16533  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16534  goto __pyx_L0;
16535 
16536  /* "View.MemoryView":1009
16537  * cdef _memoryviewslice result
16538  *
16539  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
16540  * return None
16541  *
16542  */
16543  }
16544 
16545  /* "View.MemoryView":1015
16546  *
16547  *
16548  * result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<<
16549  *
16550  * result.from_slice = memviewslice
16551  */
16552  __Pyx_TraceLine(1015,0,__PYX_ERR(1, 1015, __pyx_L1_error))
16553  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error)
16554  __Pyx_GOTREF(__pyx_t_2);
16555  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1015, __pyx_L1_error)
16556  __Pyx_GOTREF(__pyx_t_3);
16557  __Pyx_INCREF(Py_None);
16558  __Pyx_GIVEREF(Py_None);
16559  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
16560  __Pyx_INCREF(__pyx_int_0);
16561  __Pyx_GIVEREF(__pyx_int_0);
16562  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
16563  __Pyx_GIVEREF(__pyx_t_2);
16564  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
16565  __pyx_t_2 = 0;
16566  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error)
16567  __Pyx_GOTREF(__pyx_t_2);
16568  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16569  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
16570  __pyx_t_2 = 0;
16571 
16572  /* "View.MemoryView":1017
16573  * result = _memoryviewslice(None, 0, dtype_is_object)
16574  *
16575  * result.from_slice = memviewslice # <<<<<<<<<<<<<<
16576  * __PYX_INC_MEMVIEW(&memviewslice, 1)
16577  *
16578  */
16579  __Pyx_TraceLine(1017,0,__PYX_ERR(1, 1017, __pyx_L1_error))
16580  __pyx_v_result->from_slice = __pyx_v_memviewslice;
16581 
16582  /* "View.MemoryView":1018
16583  *
16584  * result.from_slice = memviewslice
16585  * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
16586  *
16587  * result.from_object = (<memoryview> memviewslice.memview).base
16588  */
16589  __Pyx_TraceLine(1018,0,__PYX_ERR(1, 1018, __pyx_L1_error))
16590  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
16591 
16592  /* "View.MemoryView":1020
16593  * __PYX_INC_MEMVIEW(&memviewslice, 1)
16594  *
16595  * result.from_object = (<memoryview> memviewslice.memview).base # <<<<<<<<<<<<<<
16596  * result.typeinfo = memviewslice.memview.typeinfo
16597  *
16598  */
16599  __Pyx_TraceLine(1020,0,__PYX_ERR(1, 1020, __pyx_L1_error))
16600  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1020, __pyx_L1_error)
16601  __Pyx_GOTREF(__pyx_t_2);
16602  __Pyx_GIVEREF(__pyx_t_2);
16603  __Pyx_GOTREF(__pyx_v_result->from_object);
16604  __Pyx_DECREF(__pyx_v_result->from_object);
16605  __pyx_v_result->from_object = __pyx_t_2;
16606  __pyx_t_2 = 0;
16607 
16608  /* "View.MemoryView":1021
16609  *
16610  * result.from_object = (<memoryview> memviewslice.memview).base
16611  * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
16612  *
16613  * result.view = memviewslice.memview.view
16614  */
16615  __Pyx_TraceLine(1021,0,__PYX_ERR(1, 1021, __pyx_L1_error))
16616  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
16617  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
16618 
16619  /* "View.MemoryView":1023
16620  * result.typeinfo = memviewslice.memview.typeinfo
16621  *
16622  * result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
16623  * result.view.buf = <void *> memviewslice.data
16624  * result.view.ndim = ndim
16625  */
16626  __Pyx_TraceLine(1023,0,__PYX_ERR(1, 1023, __pyx_L1_error))
16627  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
16628  __pyx_v_result->__pyx_base.view = __pyx_t_5;
16629 
16630  /* "View.MemoryView":1024
16631  *
16632  * result.view = memviewslice.memview.view
16633  * result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
16634  * result.view.ndim = ndim
16635  * (<__pyx_buffer *> &result.view).obj = Py_None
16636  */
16637  __Pyx_TraceLine(1024,0,__PYX_ERR(1, 1024, __pyx_L1_error))
16638  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
16639 
16640  /* "View.MemoryView":1025
16641  * result.view = memviewslice.memview.view
16642  * result.view.buf = <void *> memviewslice.data
16643  * result.view.ndim = ndim # <<<<<<<<<<<<<<
16644  * (<__pyx_buffer *> &result.view).obj = Py_None
16645  * Py_INCREF(Py_None)
16646  */
16647  __Pyx_TraceLine(1025,0,__PYX_ERR(1, 1025, __pyx_L1_error))
16648  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
16649 
16650  /* "View.MemoryView":1026
16651  * result.view.buf = <void *> memviewslice.data
16652  * result.view.ndim = ndim
16653  * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
16654  * Py_INCREF(Py_None)
16655  *
16656  */
16657  __Pyx_TraceLine(1026,0,__PYX_ERR(1, 1026, __pyx_L1_error))
16658  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
16659 
16660  /* "View.MemoryView":1027
16661  * result.view.ndim = ndim
16662  * (<__pyx_buffer *> &result.view).obj = Py_None
16663  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
16664  *
16665  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
16666  */
16667  __Pyx_TraceLine(1027,0,__PYX_ERR(1, 1027, __pyx_L1_error))
16668  Py_INCREF(Py_None);
16669 
16670  /* "View.MemoryView":1029
16671  * Py_INCREF(Py_None)
16672  *
16673  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
16674  * result.flags = PyBUF_RECORDS
16675  * else:
16676  */
16677  __Pyx_TraceLine(1029,0,__PYX_ERR(1, 1029, __pyx_L1_error))
16678  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
16679  if (__pyx_t_1) {
16680 
16681  /* "View.MemoryView":1030
16682  *
16683  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
16684  * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
16685  * else:
16686  * result.flags = PyBUF_RECORDS_RO
16687  */
16688  __Pyx_TraceLine(1030,0,__PYX_ERR(1, 1030, __pyx_L1_error))
16689  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
16690 
16691  /* "View.MemoryView":1029
16692  * Py_INCREF(Py_None)
16693  *
16694  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
16695  * result.flags = PyBUF_RECORDS
16696  * else:
16697  */
16698  goto __pyx_L4;
16699  }
16700 
16701  /* "View.MemoryView":1032
16702  * result.flags = PyBUF_RECORDS
16703  * else:
16704  * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
16705  *
16706  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
16707  */
16708  __Pyx_TraceLine(1032,0,__PYX_ERR(1, 1032, __pyx_L1_error))
16709  /*else*/ {
16710  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
16711  }
16712  __pyx_L4:;
16713 
16714  /* "View.MemoryView":1034
16715  * result.flags = PyBUF_RECORDS_RO
16716  *
16717  * result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
16718  * result.view.strides = <Py_ssize_t *> result.from_slice.strides
16719  *
16720  */
16721  __Pyx_TraceLine(1034,0,__PYX_ERR(1, 1034, __pyx_L1_error))
16722  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
16723 
16724  /* "View.MemoryView":1035
16725  *
16726  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
16727  * result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
16728  *
16729  *
16730  */
16731  __Pyx_TraceLine(1035,0,__PYX_ERR(1, 1035, __pyx_L1_error))
16732  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
16733 
16734  /* "View.MemoryView":1038
16735  *
16736  *
16737  * result.view.suboffsets = NULL # <<<<<<<<<<<<<<
16738  * for suboffset in result.from_slice.suboffsets[:ndim]:
16739  * if suboffset >= 0:
16740  */
16741  __Pyx_TraceLine(1038,0,__PYX_ERR(1, 1038, __pyx_L1_error))
16742  __pyx_v_result->__pyx_base.view.suboffsets = NULL;
16743 
16744  /* "View.MemoryView":1039
16745  *
16746  * result.view.suboffsets = NULL
16747  * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
16748  * if suboffset >= 0:
16749  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16750  */
16751  __Pyx_TraceLine(1039,0,__PYX_ERR(1, 1039, __pyx_L1_error))
16752  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
16753  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
16754  __pyx_t_6 = __pyx_t_8;
16755  __pyx_v_suboffset = (__pyx_t_6[0]);
16756 
16757  /* "View.MemoryView":1040
16758  * result.view.suboffsets = NULL
16759  * for suboffset in result.from_slice.suboffsets[:ndim]:
16760  * if suboffset >= 0: # <<<<<<<<<<<<<<
16761  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16762  * break
16763  */
16764  __Pyx_TraceLine(1040,0,__PYX_ERR(1, 1040, __pyx_L1_error))
16765  __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
16766  if (__pyx_t_1) {
16767 
16768  /* "View.MemoryView":1041
16769  * for suboffset in result.from_slice.suboffsets[:ndim]:
16770  * if suboffset >= 0:
16771  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
16772  * break
16773  *
16774  */
16775  __Pyx_TraceLine(1041,0,__PYX_ERR(1, 1041, __pyx_L1_error))
16776  __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
16777 
16778  /* "View.MemoryView":1042
16779  * if suboffset >= 0:
16780  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16781  * break # <<<<<<<<<<<<<<
16782  *
16783  * result.view.len = result.view.itemsize
16784  */
16785  __Pyx_TraceLine(1042,0,__PYX_ERR(1, 1042, __pyx_L1_error))
16786  goto __pyx_L6_break;
16787 
16788  /* "View.MemoryView":1040
16789  * result.view.suboffsets = NULL
16790  * for suboffset in result.from_slice.suboffsets[:ndim]:
16791  * if suboffset >= 0: # <<<<<<<<<<<<<<
16792  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16793  * break
16794  */
16795  }
16796  }
16797  __pyx_L6_break:;
16798 
16799  /* "View.MemoryView":1044
16800  * break
16801  *
16802  * result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
16803  * for length in result.view.shape[:ndim]:
16804  * result.view.len *= length
16805  */
16806  __Pyx_TraceLine(1044,0,__PYX_ERR(1, 1044, __pyx_L1_error))
16807  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
16808  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
16809 
16810  /* "View.MemoryView":1045
16811  *
16812  * result.view.len = result.view.itemsize
16813  * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
16814  * result.view.len *= length
16815  *
16816  */
16817  __Pyx_TraceLine(1045,0,__PYX_ERR(1, 1045, __pyx_L1_error))
16818  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
16819  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
16820  __pyx_t_6 = __pyx_t_8;
16821  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1045, __pyx_L1_error)
16822  __Pyx_GOTREF(__pyx_t_2);
16823  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
16824  __pyx_t_2 = 0;
16825 
16826  /* "View.MemoryView":1046
16827  * result.view.len = result.view.itemsize
16828  * for length in result.view.shape[:ndim]:
16829  * result.view.len *= length # <<<<<<<<<<<<<<
16830  *
16831  * result.to_object_func = to_object_func
16832  */
16833  __Pyx_TraceLine(1046,0,__PYX_ERR(1, 1046, __pyx_L1_error))
16834  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1046, __pyx_L1_error)
16835  __Pyx_GOTREF(__pyx_t_2);
16836  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1046, __pyx_L1_error)
16837  __Pyx_GOTREF(__pyx_t_3);
16838  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16839  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1046, __pyx_L1_error)
16840  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16841  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
16842  }
16843 
16844  /* "View.MemoryView":1048
16845  * result.view.len *= length
16846  *
16847  * result.to_object_func = to_object_func # <<<<<<<<<<<<<<
16848  * result.to_dtype_func = to_dtype_func
16849  *
16850  */
16851  __Pyx_TraceLine(1048,0,__PYX_ERR(1, 1048, __pyx_L1_error))
16852  __pyx_v_result->to_object_func = __pyx_v_to_object_func;
16853 
16854  /* "View.MemoryView":1049
16855  *
16856  * result.to_object_func = to_object_func
16857  * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
16858  *
16859  * return result
16860  */
16861  __Pyx_TraceLine(1049,0,__PYX_ERR(1, 1049, __pyx_L1_error))
16862  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
16863 
16864  /* "View.MemoryView":1051
16865  * result.to_dtype_func = to_dtype_func
16866  *
16867  * return result # <<<<<<<<<<<<<<
16868  *
16869  * @cname('__pyx_memoryview_get_slice_from_memoryview')
16870  */
16871  __Pyx_TraceLine(1051,0,__PYX_ERR(1, 1051, __pyx_L1_error))
16872  __Pyx_XDECREF(__pyx_r);
16873  __Pyx_INCREF(((PyObject *)__pyx_v_result));
16874  __pyx_r = ((PyObject *)__pyx_v_result);
16875  goto __pyx_L0;
16876 
16877  /* "View.MemoryView":1001
16878  *
16879  * @cname('__pyx_memoryview_fromslice')
16880  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
16881  * int ndim,
16882  * object (*to_object_func)(char *),
16883  */
16884 
16885  /* function exit code */
16886  __pyx_L1_error:;
16887  __Pyx_XDECREF(__pyx_t_2);
16888  __Pyx_XDECREF(__pyx_t_3);
16889  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
16890  __pyx_r = 0;
16891  __pyx_L0:;
16892  __Pyx_XDECREF((PyObject *)__pyx_v_result);
16893  __Pyx_XDECREF(__pyx_v_length);
16894  __Pyx_XGIVEREF(__pyx_r);
16895  __Pyx_TraceReturn(__pyx_r, 0);
16896  __Pyx_RefNannyFinishContext();
16897  return __pyx_r;
16898 }
16899 
16900 /* "View.MemoryView":1054
16901  *
16902  * @cname('__pyx_memoryview_get_slice_from_memoryview')
16903  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
16904  * __Pyx_memviewslice *mslice) except NULL:
16905  * cdef _memoryviewslice obj
16906  */
16907 
16908 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
16909  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
16910  __Pyx_memviewslice *__pyx_r;
16911  __Pyx_TraceDeclarations
16912  __Pyx_RefNannyDeclarations
16913  int __pyx_t_1;
16914  int __pyx_t_2;
16915  PyObject *__pyx_t_3 = NULL;
16916  int __pyx_lineno = 0;
16917  const char *__pyx_filename = NULL;
16918  int __pyx_clineno = 0;
16919  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
16920  __Pyx_TraceCall("get_slice_from_memview", __pyx_f[1], 1054, 0, __PYX_ERR(1, 1054, __pyx_L1_error));
16921 
16922  /* "View.MemoryView":1057
16923  * __Pyx_memviewslice *mslice) except NULL:
16924  * cdef _memoryviewslice obj
16925  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
16926  * obj = memview
16927  * return &obj.from_slice
16928  */
16929  __Pyx_TraceLine(1057,0,__PYX_ERR(1, 1057, __pyx_L1_error))
16930  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
16931  __pyx_t_2 = (__pyx_t_1 != 0);
16932  if (__pyx_t_2) {
16933 
16934  /* "View.MemoryView":1058
16935  * cdef _memoryviewslice obj
16936  * if isinstance(memview, _memoryviewslice):
16937  * obj = memview # <<<<<<<<<<<<<<
16938  * return &obj.from_slice
16939  * else:
16940  */
16941  __Pyx_TraceLine(1058,0,__PYX_ERR(1, 1058, __pyx_L1_error))
16942  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1058, __pyx_L1_error)
16943  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
16944  __Pyx_INCREF(__pyx_t_3);
16945  __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
16946  __pyx_t_3 = 0;
16947 
16948  /* "View.MemoryView":1059
16949  * if isinstance(memview, _memoryviewslice):
16950  * obj = memview
16951  * return &obj.from_slice # <<<<<<<<<<<<<<
16952  * else:
16953  * slice_copy(memview, mslice)
16954  */
16955  __Pyx_TraceLine(1059,0,__PYX_ERR(1, 1059, __pyx_L1_error))
16956  __pyx_r = (&__pyx_v_obj->from_slice);
16957  goto __pyx_L0;
16958 
16959  /* "View.MemoryView":1057
16960  * __Pyx_memviewslice *mslice) except NULL:
16961  * cdef _memoryviewslice obj
16962  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
16963  * obj = memview
16964  * return &obj.from_slice
16965  */
16966  }
16967 
16968  /* "View.MemoryView":1061
16969  * return &obj.from_slice
16970  * else:
16971  * slice_copy(memview, mslice) # <<<<<<<<<<<<<<
16972  * return mslice
16973  *
16974  */
16975  __Pyx_TraceLine(1061,0,__PYX_ERR(1, 1061, __pyx_L1_error))
16976  /*else*/ {
16977  __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
16978 
16979  /* "View.MemoryView":1062
16980  * else:
16981  * slice_copy(memview, mslice)
16982  * return mslice # <<<<<<<<<<<<<<
16983  *
16984  * @cname('__pyx_memoryview_slice_copy')
16985  */
16986  __Pyx_TraceLine(1062,0,__PYX_ERR(1, 1062, __pyx_L1_error))
16987  __pyx_r = __pyx_v_mslice;
16988  goto __pyx_L0;
16989  }
16990 
16991  /* "View.MemoryView":1054
16992  *
16993  * @cname('__pyx_memoryview_get_slice_from_memoryview')
16994  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
16995  * __Pyx_memviewslice *mslice) except NULL:
16996  * cdef _memoryviewslice obj
16997  */
16998 
16999  /* function exit code */
17000  __pyx_L1_error:;
17001  __Pyx_XDECREF(__pyx_t_3);
17002  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
17003  __pyx_r = NULL;
17004  __pyx_L0:;
17005  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
17006  __Pyx_TraceReturn(Py_None, 0);
17007  __Pyx_RefNannyFinishContext();
17008  return __pyx_r;
17009 }
17010 
17011 /* "View.MemoryView":1065
17012  *
17013  * @cname('__pyx_memoryview_slice_copy')
17014  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
17015  * cdef int dim
17016  * cdef (Py_ssize_t*) shape, strides, suboffsets
17017  */
17018 
17019 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
17020  int __pyx_v_dim;
17021  Py_ssize_t *__pyx_v_shape;
17022  Py_ssize_t *__pyx_v_strides;
17023  Py_ssize_t *__pyx_v_suboffsets;
17024  __Pyx_TraceDeclarations
17025  __Pyx_RefNannyDeclarations
17026  Py_ssize_t *__pyx_t_1;
17027  int __pyx_t_2;
17028  int __pyx_t_3;
17029  int __pyx_t_4;
17030  Py_ssize_t __pyx_t_5;
17031  int __pyx_lineno = 0;
17032  const char *__pyx_filename = NULL;
17033  int __pyx_clineno = 0;
17034  __Pyx_RefNannySetupContext("slice_copy", 0);
17035  __Pyx_TraceCall("slice_copy", __pyx_f[1], 1065, 0, __PYX_ERR(1, 1065, __pyx_L1_error));
17036 
17037  /* "View.MemoryView":1069
17038  * cdef (Py_ssize_t*) shape, strides, suboffsets
17039  *
17040  * shape = memview.view.shape # <<<<<<<<<<<<<<
17041  * strides = memview.view.strides
17042  * suboffsets = memview.view.suboffsets
17043  */
17044  __Pyx_TraceLine(1069,0,__PYX_ERR(1, 1069, __pyx_L1_error))
17045  __pyx_t_1 = __pyx_v_memview->view.shape;
17046  __pyx_v_shape = __pyx_t_1;
17047 
17048  /* "View.MemoryView":1070
17049  *
17050  * shape = memview.view.shape
17051  * strides = memview.view.strides # <<<<<<<<<<<<<<
17052  * suboffsets = memview.view.suboffsets
17053  *
17054  */
17055  __Pyx_TraceLine(1070,0,__PYX_ERR(1, 1070, __pyx_L1_error))
17056  __pyx_t_1 = __pyx_v_memview->view.strides;
17057  __pyx_v_strides = __pyx_t_1;
17058 
17059  /* "View.MemoryView":1071
17060  * shape = memview.view.shape
17061  * strides = memview.view.strides
17062  * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
17063  *
17064  * dst.memview = <__pyx_memoryview *> memview
17065  */
17066  __Pyx_TraceLine(1071,0,__PYX_ERR(1, 1071, __pyx_L1_error))
17067  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
17068  __pyx_v_suboffsets = __pyx_t_1;
17069 
17070  /* "View.MemoryView":1073
17071  * suboffsets = memview.view.suboffsets
17072  *
17073  * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
17074  * dst.data = <char *> memview.view.buf
17075  *
17076  */
17077  __Pyx_TraceLine(1073,0,__PYX_ERR(1, 1073, __pyx_L1_error))
17078  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
17079 
17080  /* "View.MemoryView":1074
17081  *
17082  * dst.memview = <__pyx_memoryview *> memview
17083  * dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
17084  *
17085  * for dim in range(memview.view.ndim):
17086  */
17087  __Pyx_TraceLine(1074,0,__PYX_ERR(1, 1074, __pyx_L1_error))
17088  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
17089 
17090  /* "View.MemoryView":1076
17091  * dst.data = <char *> memview.view.buf
17092  *
17093  * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
17094  * dst.shape[dim] = shape[dim]
17095  * dst.strides[dim] = strides[dim]
17096  */
17097  __Pyx_TraceLine(1076,0,__PYX_ERR(1, 1076, __pyx_L1_error))
17098  __pyx_t_2 = __pyx_v_memview->view.ndim;
17099  __pyx_t_3 = __pyx_t_2;
17100  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
17101  __pyx_v_dim = __pyx_t_4;
17102 
17103  /* "View.MemoryView":1077
17104  *
17105  * for dim in range(memview.view.ndim):
17106  * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
17107  * dst.strides[dim] = strides[dim]
17108  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
17109  */
17110  __Pyx_TraceLine(1077,0,__PYX_ERR(1, 1077, __pyx_L1_error))
17111  (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
17112 
17113  /* "View.MemoryView":1078
17114  * for dim in range(memview.view.ndim):
17115  * dst.shape[dim] = shape[dim]
17116  * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
17117  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
17118  *
17119  */
17120  __Pyx_TraceLine(1078,0,__PYX_ERR(1, 1078, __pyx_L1_error))
17121  (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
17122 
17123  /* "View.MemoryView":1079
17124  * dst.shape[dim] = shape[dim]
17125  * dst.strides[dim] = strides[dim]
17126  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
17127  *
17128  * @cname('__pyx_memoryview_copy_object')
17129  */
17130  __Pyx_TraceLine(1079,0,__PYX_ERR(1, 1079, __pyx_L1_error))
17131  if ((__pyx_v_suboffsets != 0)) {
17132  __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
17133  } else {
17134  __pyx_t_5 = -1L;
17135  }
17136  (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
17137  }
17138 
17139  /* "View.MemoryView":1065
17140  *
17141  * @cname('__pyx_memoryview_slice_copy')
17142  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
17143  * cdef int dim
17144  * cdef (Py_ssize_t*) shape, strides, suboffsets
17145  */
17146 
17147  /* function exit code */
17148  goto __pyx_L0;
17149  __pyx_L1_error:;
17150  __Pyx_WriteUnraisable("View.MemoryView.slice_copy", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
17151  __pyx_L0:;
17152  __Pyx_TraceReturn(Py_None, 0);
17153  __Pyx_RefNannyFinishContext();
17154 }
17155 
17156 /* "View.MemoryView":1082
17157  *
17158  * @cname('__pyx_memoryview_copy_object')
17159  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
17160  * "Create a new memoryview object"
17161  * cdef __Pyx_memviewslice memviewslice
17162  */
17163 
17164 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
17165  __Pyx_memviewslice __pyx_v_memviewslice;
17166  PyObject *__pyx_r = NULL;
17167  __Pyx_TraceDeclarations
17168  __Pyx_RefNannyDeclarations
17169  PyObject *__pyx_t_1 = NULL;
17170  int __pyx_lineno = 0;
17171  const char *__pyx_filename = NULL;
17172  int __pyx_clineno = 0;
17173  __Pyx_RefNannySetupContext("memoryview_copy", 0);
17174  __Pyx_TraceCall("memoryview_copy", __pyx_f[1], 1082, 0, __PYX_ERR(1, 1082, __pyx_L1_error));
17175 
17176  /* "View.MemoryView":1085
17177  * "Create a new memoryview object"
17178  * cdef __Pyx_memviewslice memviewslice
17179  * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
17180  * return memoryview_copy_from_slice(memview, &memviewslice)
17181  *
17182  */
17183  __Pyx_TraceLine(1085,0,__PYX_ERR(1, 1085, __pyx_L1_error))
17184  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
17185 
17186  /* "View.MemoryView":1086
17187  * cdef __Pyx_memviewslice memviewslice
17188  * slice_copy(memview, &memviewslice)
17189  * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
17190  *
17191  * @cname('__pyx_memoryview_copy_object_from_slice')
17192  */
17193  __Pyx_TraceLine(1086,0,__PYX_ERR(1, 1086, __pyx_L1_error))
17194  __Pyx_XDECREF(__pyx_r);
17195  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1086, __pyx_L1_error)
17196  __Pyx_GOTREF(__pyx_t_1);
17197  __pyx_r = __pyx_t_1;
17198  __pyx_t_1 = 0;
17199  goto __pyx_L0;
17200 
17201  /* "View.MemoryView":1082
17202  *
17203  * @cname('__pyx_memoryview_copy_object')
17204  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
17205  * "Create a new memoryview object"
17206  * cdef __Pyx_memviewslice memviewslice
17207  */
17208 
17209  /* function exit code */
17210  __pyx_L1_error:;
17211  __Pyx_XDECREF(__pyx_t_1);
17212  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
17213  __pyx_r = 0;
17214  __pyx_L0:;
17215  __Pyx_XGIVEREF(__pyx_r);
17216  __Pyx_TraceReturn(__pyx_r, 0);
17217  __Pyx_RefNannyFinishContext();
17218  return __pyx_r;
17219 }
17220 
17221 /* "View.MemoryView":1089
17222  *
17223  * @cname('__pyx_memoryview_copy_object_from_slice')
17224  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
17225  * """
17226  * Create a new memoryview object from a given memoryview object and slice.
17227  */
17228 
17229 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
17230  PyObject *(*__pyx_v_to_object_func)(char *);
17231  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
17232  PyObject *__pyx_r = NULL;
17233  __Pyx_TraceDeclarations
17234  __Pyx_RefNannyDeclarations
17235  int __pyx_t_1;
17236  int __pyx_t_2;
17237  PyObject *(*__pyx_t_3)(char *);
17238  int (*__pyx_t_4)(char *, PyObject *);
17239  PyObject *__pyx_t_5 = NULL;
17240  int __pyx_lineno = 0;
17241  const char *__pyx_filename = NULL;
17242  int __pyx_clineno = 0;
17243  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
17244  __Pyx_TraceCall("memoryview_copy_from_slice", __pyx_f[1], 1089, 0, __PYX_ERR(1, 1089, __pyx_L1_error));
17245 
17246  /* "View.MemoryView":1096
17247  * cdef int (*to_dtype_func)(char *, object) except 0
17248  *
17249  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
17250  * to_object_func = (<_memoryviewslice> memview).to_object_func
17251  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
17252  */
17253  __Pyx_TraceLine(1096,0,__PYX_ERR(1, 1096, __pyx_L1_error))
17254  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
17255  __pyx_t_2 = (__pyx_t_1 != 0);
17256  if (__pyx_t_2) {
17257 
17258  /* "View.MemoryView":1097
17259  *
17260  * if isinstance(memview, _memoryviewslice):
17261  * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
17262  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
17263  * else:
17264  */
17265  __Pyx_TraceLine(1097,0,__PYX_ERR(1, 1097, __pyx_L1_error))
17266  __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
17267  __pyx_v_to_object_func = __pyx_t_3;
17268 
17269  /* "View.MemoryView":1098
17270  * if isinstance(memview, _memoryviewslice):
17271  * to_object_func = (<_memoryviewslice> memview).to_object_func
17272  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
17273  * else:
17274  * to_object_func = NULL
17275  */
17276  __Pyx_TraceLine(1098,0,__PYX_ERR(1, 1098, __pyx_L1_error))
17277  __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
17278  __pyx_v_to_dtype_func = __pyx_t_4;
17279 
17280  /* "View.MemoryView":1096
17281  * cdef int (*to_dtype_func)(char *, object) except 0
17282  *
17283  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
17284  * to_object_func = (<_memoryviewslice> memview).to_object_func
17285  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
17286  */
17287  goto __pyx_L3;
17288  }
17289 
17290  /* "View.MemoryView":1100
17291  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
17292  * else:
17293  * to_object_func = NULL # <<<<<<<<<<<<<<
17294  * to_dtype_func = NULL
17295  *
17296  */
17297  __Pyx_TraceLine(1100,0,__PYX_ERR(1, 1100, __pyx_L1_error))
17298  /*else*/ {
17299  __pyx_v_to_object_func = NULL;
17300 
17301  /* "View.MemoryView":1101
17302  * else:
17303  * to_object_func = NULL
17304  * to_dtype_func = NULL # <<<<<<<<<<<<<<
17305  *
17306  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
17307  */
17308  __Pyx_TraceLine(1101,0,__PYX_ERR(1, 1101, __pyx_L1_error))
17309  __pyx_v_to_dtype_func = NULL;
17310  }
17311  __pyx_L3:;
17312 
17313  /* "View.MemoryView":1103
17314  * to_dtype_func = NULL
17315  *
17316  * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
17317  * to_object_func, to_dtype_func,
17318  * memview.dtype_is_object)
17319  */
17320  __Pyx_TraceLine(1103,0,__PYX_ERR(1, 1103, __pyx_L1_error))
17321  __Pyx_XDECREF(__pyx_r);
17322 
17323  /* "View.MemoryView":1105
17324  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
17325  * to_object_func, to_dtype_func,
17326  * memview.dtype_is_object) # <<<<<<<<<<<<<<
17327  *
17328  *
17329  */
17330  __Pyx_TraceLine(1105,0,__PYX_ERR(1, 1105, __pyx_L1_error))
17331  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1103, __pyx_L1_error)
17332  __Pyx_GOTREF(__pyx_t_5);
17333  __pyx_r = __pyx_t_5;
17334  __pyx_t_5 = 0;
17335  goto __pyx_L0;
17336 
17337  /* "View.MemoryView":1089
17338  *
17339  * @cname('__pyx_memoryview_copy_object_from_slice')
17340  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
17341  * """
17342  * Create a new memoryview object from a given memoryview object and slice.
17343  */
17344 
17345  /* function exit code */
17346  __pyx_L1_error:;
17347  __Pyx_XDECREF(__pyx_t_5);
17348  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
17349  __pyx_r = 0;
17350  __pyx_L0:;
17351  __Pyx_XGIVEREF(__pyx_r);
17352  __Pyx_TraceReturn(__pyx_r, 0);
17353  __Pyx_RefNannyFinishContext();
17354  return __pyx_r;
17355 }
17356 
17357 /* "View.MemoryView":1111
17358  *
17359  *
17360  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
17361  * if arg < 0:
17362  * return -arg
17363  */
17364 
17365 static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
17366  Py_ssize_t __pyx_r;
17367  __Pyx_TraceDeclarations
17368  int __pyx_t_1;
17369  int __pyx_lineno = 0;
17370  const char *__pyx_filename = NULL;
17371  int __pyx_clineno = 0;
17372  __Pyx_TraceCall("abs_py_ssize_t", __pyx_f[1], 1111, 1, __PYX_ERR(1, 1111, __pyx_L1_error));
17373 
17374  /* "View.MemoryView":1112
17375  *
17376  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
17377  * if arg < 0: # <<<<<<<<<<<<<<
17378  * return -arg
17379  * else:
17380  */
17381  __Pyx_TraceLine(1112,1,__PYX_ERR(1, 1112, __pyx_L1_error))
17382  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
17383  if (__pyx_t_1) {
17384 
17385  /* "View.MemoryView":1113
17386  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
17387  * if arg < 0:
17388  * return -arg # <<<<<<<<<<<<<<
17389  * else:
17390  * return arg
17391  */
17392  __Pyx_TraceLine(1113,1,__PYX_ERR(1, 1113, __pyx_L1_error))
17393  __pyx_r = (-__pyx_v_arg);
17394  goto __pyx_L0;
17395 
17396  /* "View.MemoryView":1112
17397  *
17398  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
17399  * if arg < 0: # <<<<<<<<<<<<<<
17400  * return -arg
17401  * else:
17402  */
17403  }
17404 
17405  /* "View.MemoryView":1115
17406  * return -arg
17407  * else:
17408  * return arg # <<<<<<<<<<<<<<
17409  *
17410  * @cname('__pyx_get_best_slice_order')
17411  */
17412  __Pyx_TraceLine(1115,1,__PYX_ERR(1, 1115, __pyx_L1_error))
17413  /*else*/ {
17414  __pyx_r = __pyx_v_arg;
17415  goto __pyx_L0;
17416  }
17417 
17418  /* "View.MemoryView":1111
17419  *
17420  *
17421  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
17422  * if arg < 0:
17423  * return -arg
17424  */
17425 
17426  /* function exit code */
17427  __pyx_L1_error:;
17428  __Pyx_WriteUnraisable("View.MemoryView.abs_py_ssize_t", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
17429  __pyx_r = 0;
17430  __pyx_L0:;
17431  __Pyx_TraceReturn(Py_None, 1);
17432  return __pyx_r;
17433 }
17434 
17435 /* "View.MemoryView":1118
17436  *
17437  * @cname('__pyx_get_best_slice_order')
17438  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
17439  * """
17440  * Figure out the best memory access order for a given slice.
17441  */
17442 
17443 static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
17444  int __pyx_v_i;
17445  Py_ssize_t __pyx_v_c_stride;
17446  Py_ssize_t __pyx_v_f_stride;
17447  char __pyx_r;
17448  __Pyx_TraceDeclarations
17449  int __pyx_t_1;
17450  int __pyx_t_2;
17451  int __pyx_t_3;
17452  int __pyx_t_4;
17453  int __pyx_lineno = 0;
17454  const char *__pyx_filename = NULL;
17455  int __pyx_clineno = 0;
17456  __Pyx_TraceCall("get_best_order", __pyx_f[1], 1118, 1, __PYX_ERR(1, 1118, __pyx_L1_error));
17457 
17458  /* "View.MemoryView":1123
17459  * """
17460  * cdef int i
17461  * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
17462  * cdef Py_ssize_t f_stride = 0
17463  *
17464  */
17465  __Pyx_TraceLine(1123,1,__PYX_ERR(1, 1123, __pyx_L1_error))
17466  __pyx_v_c_stride = 0;
17467 
17468  /* "View.MemoryView":1124
17469  * cdef int i
17470  * cdef Py_ssize_t c_stride = 0
17471  * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
17472  *
17473  * for i in range(ndim - 1, -1, -1):
17474  */
17475  __Pyx_TraceLine(1124,1,__PYX_ERR(1, 1124, __pyx_L1_error))
17476  __pyx_v_f_stride = 0;
17477 
17478  /* "View.MemoryView":1126
17479  * cdef Py_ssize_t f_stride = 0
17480  *
17481  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
17482  * if mslice.shape[i] > 1:
17483  * c_stride = mslice.strides[i]
17484  */
17485  __Pyx_TraceLine(1126,1,__PYX_ERR(1, 1126, __pyx_L1_error))
17486  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
17487  __pyx_v_i = __pyx_t_1;
17488 
17489  /* "View.MemoryView":1127
17490  *
17491  * for i in range(ndim - 1, -1, -1):
17492  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
17493  * c_stride = mslice.strides[i]
17494  * break
17495  */
17496  __Pyx_TraceLine(1127,1,__PYX_ERR(1, 1127, __pyx_L1_error))
17497  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
17498  if (__pyx_t_2) {
17499 
17500  /* "View.MemoryView":1128
17501  * for i in range(ndim - 1, -1, -1):
17502  * if mslice.shape[i] > 1:
17503  * c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
17504  * break
17505  *
17506  */
17507  __Pyx_TraceLine(1128,1,__PYX_ERR(1, 1128, __pyx_L1_error))
17508  __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
17509 
17510  /* "View.MemoryView":1129
17511  * if mslice.shape[i] > 1:
17512  * c_stride = mslice.strides[i]
17513  * break # <<<<<<<<<<<<<<
17514  *
17515  * for i in range(ndim):
17516  */
17517  __Pyx_TraceLine(1129,1,__PYX_ERR(1, 1129, __pyx_L1_error))
17518  goto __pyx_L4_break;
17519 
17520  /* "View.MemoryView":1127
17521  *
17522  * for i in range(ndim - 1, -1, -1):
17523  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
17524  * c_stride = mslice.strides[i]
17525  * break
17526  */
17527  }
17528  }
17529  __pyx_L4_break:;
17530 
17531  /* "View.MemoryView":1131
17532  * break
17533  *
17534  * for i in range(ndim): # <<<<<<<<<<<<<<
17535  * if mslice.shape[i] > 1:
17536  * f_stride = mslice.strides[i]
17537  */
17538  __Pyx_TraceLine(1131,1,__PYX_ERR(1, 1131, __pyx_L1_error))
17539  __pyx_t_1 = __pyx_v_ndim;
17540  __pyx_t_3 = __pyx_t_1;
17541  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
17542  __pyx_v_i = __pyx_t_4;
17543 
17544  /* "View.MemoryView":1132
17545  *
17546  * for i in range(ndim):
17547  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
17548  * f_stride = mslice.strides[i]
17549  * break
17550  */
17551  __Pyx_TraceLine(1132,1,__PYX_ERR(1, 1132, __pyx_L1_error))
17552  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
17553  if (__pyx_t_2) {
17554 
17555  /* "View.MemoryView":1133
17556  * for i in range(ndim):
17557  * if mslice.shape[i] > 1:
17558  * f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
17559  * break
17560  *
17561  */
17562  __Pyx_TraceLine(1133,1,__PYX_ERR(1, 1133, __pyx_L1_error))
17563  __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
17564 
17565  /* "View.MemoryView":1134
17566  * if mslice.shape[i] > 1:
17567  * f_stride = mslice.strides[i]
17568  * break # <<<<<<<<<<<<<<
17569  *
17570  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
17571  */
17572  __Pyx_TraceLine(1134,1,__PYX_ERR(1, 1134, __pyx_L1_error))
17573  goto __pyx_L7_break;
17574 
17575  /* "View.MemoryView":1132
17576  *
17577  * for i in range(ndim):
17578  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
17579  * f_stride = mslice.strides[i]
17580  * break
17581  */
17582  }
17583  }
17584  __pyx_L7_break:;
17585 
17586  /* "View.MemoryView":1136
17587  * break
17588  *
17589  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
17590  * return 'C'
17591  * else:
17592  */
17593  __Pyx_TraceLine(1136,1,__PYX_ERR(1, 1136, __pyx_L1_error))
17594  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
17595  if (__pyx_t_2) {
17596 
17597  /* "View.MemoryView":1137
17598  *
17599  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
17600  * return 'C' # <<<<<<<<<<<<<<
17601  * else:
17602  * return 'F'
17603  */
17604  __Pyx_TraceLine(1137,1,__PYX_ERR(1, 1137, __pyx_L1_error))
17605  __pyx_r = 'C';
17606  goto __pyx_L0;
17607 
17608  /* "View.MemoryView":1136
17609  * break
17610  *
17611  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
17612  * return 'C'
17613  * else:
17614  */
17615  }
17616 
17617  /* "View.MemoryView":1139
17618  * return 'C'
17619  * else:
17620  * return 'F' # <<<<<<<<<<<<<<
17621  *
17622  * @cython.cdivision(True)
17623  */
17624  __Pyx_TraceLine(1139,1,__PYX_ERR(1, 1139, __pyx_L1_error))
17625  /*else*/ {
17626  __pyx_r = 'F';
17627  goto __pyx_L0;
17628  }
17629 
17630  /* "View.MemoryView":1118
17631  *
17632  * @cname('__pyx_get_best_slice_order')
17633  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
17634  * """
17635  * Figure out the best memory access order for a given slice.
17636  */
17637 
17638  /* function exit code */
17639  __pyx_L1_error:;
17640  __Pyx_WriteUnraisable("View.MemoryView.get_best_order", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
17641  __pyx_r = 0;
17642  __pyx_L0:;
17643  __Pyx_TraceReturn(Py_None, 1);
17644  return __pyx_r;
17645 }
17646 
17647 /* "View.MemoryView":1142
17648  *
17649  * @cython.cdivision(True)
17650  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
17651  * char *dst_data, Py_ssize_t *dst_strides,
17652  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
17653  */
17654 
17655 static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
17656  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
17657  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
17658  Py_ssize_t __pyx_v_dst_extent;
17659  Py_ssize_t __pyx_v_src_stride;
17660  Py_ssize_t __pyx_v_dst_stride;
17661  int __pyx_t_1;
17662  int __pyx_t_2;
17663  int __pyx_t_3;
17664  Py_ssize_t __pyx_t_4;
17665  Py_ssize_t __pyx_t_5;
17666  Py_ssize_t __pyx_t_6;
17667 
17668  /* "View.MemoryView":1149
17669  *
17670  * cdef Py_ssize_t i
17671  * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
17672  * cdef Py_ssize_t dst_extent = dst_shape[0]
17673  * cdef Py_ssize_t src_stride = src_strides[0]
17674  */
17675  __pyx_v_src_extent = (__pyx_v_src_shape[0]);
17676 
17677  /* "View.MemoryView":1150
17678  * cdef Py_ssize_t i
17679  * cdef Py_ssize_t src_extent = src_shape[0]
17680  * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
17681  * cdef Py_ssize_t src_stride = src_strides[0]
17682  * cdef Py_ssize_t dst_stride = dst_strides[0]
17683  */
17684  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
17685 
17686  /* "View.MemoryView":1151
17687  * cdef Py_ssize_t src_extent = src_shape[0]
17688  * cdef Py_ssize_t dst_extent = dst_shape[0]
17689  * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
17690  * cdef Py_ssize_t dst_stride = dst_strides[0]
17691  *
17692  */
17693  __pyx_v_src_stride = (__pyx_v_src_strides[0]);
17694 
17695  /* "View.MemoryView":1152
17696  * cdef Py_ssize_t dst_extent = dst_shape[0]
17697  * cdef Py_ssize_t src_stride = src_strides[0]
17698  * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
17699  *
17700  * if ndim == 1:
17701  */
17702  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
17703 
17704  /* "View.MemoryView":1154
17705  * cdef Py_ssize_t dst_stride = dst_strides[0]
17706  *
17707  * if ndim == 1: # <<<<<<<<<<<<<<
17708  * if (src_stride > 0 and dst_stride > 0 and
17709  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17710  */
17711  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
17712  if (__pyx_t_1) {
17713 
17714  /* "View.MemoryView":1155
17715  *
17716  * if ndim == 1:
17717  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
17718  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17719  * memcpy(dst_data, src_data, itemsize * dst_extent)
17720  */
17721  __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
17722  if (__pyx_t_2) {
17723  } else {
17724  __pyx_t_1 = __pyx_t_2;
17725  goto __pyx_L5_bool_binop_done;
17726  }
17727  __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
17728  if (__pyx_t_2) {
17729  } else {
17730  __pyx_t_1 = __pyx_t_2;
17731  goto __pyx_L5_bool_binop_done;
17732  }
17733 
17734  /* "View.MemoryView":1156
17735  * if ndim == 1:
17736  * if (src_stride > 0 and dst_stride > 0 and
17737  * <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
17738  * memcpy(dst_data, src_data, itemsize * dst_extent)
17739  * else:
17740  */
17741  __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
17742  if (__pyx_t_2) {
17743  __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
17744  }
17745  __pyx_t_3 = (__pyx_t_2 != 0);
17746  __pyx_t_1 = __pyx_t_3;
17747  __pyx_L5_bool_binop_done:;
17748 
17749  /* "View.MemoryView":1155
17750  *
17751  * if ndim == 1:
17752  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
17753  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17754  * memcpy(dst_data, src_data, itemsize * dst_extent)
17755  */
17756  if (__pyx_t_1) {
17757 
17758  /* "View.MemoryView":1157
17759  * if (src_stride > 0 and dst_stride > 0 and
17760  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17761  * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<<
17762  * else:
17763  * for i in range(dst_extent):
17764  */
17765  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
17766 
17767  /* "View.MemoryView":1155
17768  *
17769  * if ndim == 1:
17770  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
17771  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17772  * memcpy(dst_data, src_data, itemsize * dst_extent)
17773  */
17774  goto __pyx_L4;
17775  }
17776 
17777  /* "View.MemoryView":1159
17778  * memcpy(dst_data, src_data, itemsize * dst_extent)
17779  * else:
17780  * for i in range(dst_extent): # <<<<<<<<<<<<<<
17781  * memcpy(dst_data, src_data, itemsize)
17782  * src_data += src_stride
17783  */
17784  /*else*/ {
17785  __pyx_t_4 = __pyx_v_dst_extent;
17786  __pyx_t_5 = __pyx_t_4;
17787  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
17788  __pyx_v_i = __pyx_t_6;
17789 
17790  /* "View.MemoryView":1160
17791  * else:
17792  * for i in range(dst_extent):
17793  * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
17794  * src_data += src_stride
17795  * dst_data += dst_stride
17796  */
17797  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
17798 
17799  /* "View.MemoryView":1161
17800  * for i in range(dst_extent):
17801  * memcpy(dst_data, src_data, itemsize)
17802  * src_data += src_stride # <<<<<<<<<<<<<<
17803  * dst_data += dst_stride
17804  * else:
17805  */
17806  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
17807 
17808  /* "View.MemoryView":1162
17809  * memcpy(dst_data, src_data, itemsize)
17810  * src_data += src_stride
17811  * dst_data += dst_stride # <<<<<<<<<<<<<<
17812  * else:
17813  * for i in range(dst_extent):
17814  */
17815  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
17816  }
17817  }
17818  __pyx_L4:;
17819 
17820  /* "View.MemoryView":1154
17821  * cdef Py_ssize_t dst_stride = dst_strides[0]
17822  *
17823  * if ndim == 1: # <<<<<<<<<<<<<<
17824  * if (src_stride > 0 and dst_stride > 0 and
17825  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17826  */
17827  goto __pyx_L3;
17828  }
17829 
17830  /* "View.MemoryView":1164
17831  * dst_data += dst_stride
17832  * else:
17833  * for i in range(dst_extent): # <<<<<<<<<<<<<<
17834  * _copy_strided_to_strided(src_data, src_strides + 1,
17835  * dst_data, dst_strides + 1,
17836  */
17837  /*else*/ {
17838  __pyx_t_4 = __pyx_v_dst_extent;
17839  __pyx_t_5 = __pyx_t_4;
17840  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
17841  __pyx_v_i = __pyx_t_6;
17842 
17843  /* "View.MemoryView":1165
17844  * else:
17845  * for i in range(dst_extent):
17846  * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
17847  * dst_data, dst_strides + 1,
17848  * src_shape + 1, dst_shape + 1,
17849  */
17850  _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
17851 
17852  /* "View.MemoryView":1169
17853  * src_shape + 1, dst_shape + 1,
17854  * ndim - 1, itemsize)
17855  * src_data += src_stride # <<<<<<<<<<<<<<
17856  * dst_data += dst_stride
17857  *
17858  */
17859  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
17860 
17861  /* "View.MemoryView":1170
17862  * ndim - 1, itemsize)
17863  * src_data += src_stride
17864  * dst_data += dst_stride # <<<<<<<<<<<<<<
17865  *
17866  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
17867  */
17868  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
17869  }
17870  }
17871  __pyx_L3:;
17872 
17873  /* "View.MemoryView":1142
17874  *
17875  * @cython.cdivision(True)
17876  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
17877  * char *dst_data, Py_ssize_t *dst_strides,
17878  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
17879  */
17880 
17881  /* function exit code */
17882 }
17883 
17884 /* "View.MemoryView":1172
17885  * dst_data += dst_stride
17886  *
17887  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
17888  * __Pyx_memviewslice *dst,
17889  * int ndim, size_t itemsize) nogil:
17890  */
17891 
17892 static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
17893  __Pyx_TraceDeclarations
17894  int __pyx_lineno = 0;
17895  const char *__pyx_filename = NULL;
17896  int __pyx_clineno = 0;
17897  __Pyx_TraceCall("copy_strided_to_strided", __pyx_f[1], 1172, 1, __PYX_ERR(1, 1172, __pyx_L1_error));
17898 
17899  /* "View.MemoryView":1175
17900  * __Pyx_memviewslice *dst,
17901  * int ndim, size_t itemsize) nogil:
17902  * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
17903  * src.shape, dst.shape, ndim, itemsize)
17904  *
17905  */
17906  __Pyx_TraceLine(1175,1,__PYX_ERR(1, 1175, __pyx_L1_error))
17907  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
17908 
17909  /* "View.MemoryView":1172
17910  * dst_data += dst_stride
17911  *
17912  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
17913  * __Pyx_memviewslice *dst,
17914  * int ndim, size_t itemsize) nogil:
17915  */
17916 
17917  /* function exit code */
17918  goto __pyx_L0;
17919  __pyx_L1_error:;
17920  __Pyx_WriteUnraisable("View.MemoryView.copy_strided_to_strided", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
17921  __pyx_L0:;
17922  __Pyx_TraceReturn(Py_None, 1);
17923 }
17924 
17925 /* "View.MemoryView":1179
17926  *
17927  * @cname('__pyx_memoryview_slice_get_size')
17928  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
17929  * "Return the size of the memory occupied by the slice in number of bytes"
17930  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
17931  */
17932 
17933 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
17934  Py_ssize_t __pyx_v_shape;
17935  Py_ssize_t __pyx_v_size;
17936  Py_ssize_t __pyx_r;
17937  __Pyx_TraceDeclarations
17938  Py_ssize_t __pyx_t_1;
17939  Py_ssize_t *__pyx_t_2;
17940  Py_ssize_t *__pyx_t_3;
17941  Py_ssize_t *__pyx_t_4;
17942  int __pyx_lineno = 0;
17943  const char *__pyx_filename = NULL;
17944  int __pyx_clineno = 0;
17945  __Pyx_TraceCall("slice_get_size", __pyx_f[1], 1179, 1, __PYX_ERR(1, 1179, __pyx_L1_error));
17946 
17947  /* "View.MemoryView":1181
17948  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:
17949  * "Return the size of the memory occupied by the slice in number of bytes"
17950  * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<<
17951  *
17952  * for shape in src.shape[:ndim]:
17953  */
17954  __Pyx_TraceLine(1181,1,__PYX_ERR(1, 1181, __pyx_L1_error))
17955  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
17956  __pyx_v_size = __pyx_t_1;
17957 
17958  /* "View.MemoryView":1183
17959  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
17960  *
17961  * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<<
17962  * size *= shape
17963  *
17964  */
17965  __Pyx_TraceLine(1183,1,__PYX_ERR(1, 1183, __pyx_L1_error))
17966  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
17967  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
17968  __pyx_t_2 = __pyx_t_4;
17969  __pyx_v_shape = (__pyx_t_2[0]);
17970 
17971  /* "View.MemoryView":1184
17972  *
17973  * for shape in src.shape[:ndim]:
17974  * size *= shape # <<<<<<<<<<<<<<
17975  *
17976  * return size
17977  */
17978  __Pyx_TraceLine(1184,1,__PYX_ERR(1, 1184, __pyx_L1_error))
17979  __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
17980  }
17981 
17982  /* "View.MemoryView":1186
17983  * size *= shape
17984  *
17985  * return size # <<<<<<<<<<<<<<
17986  *
17987  * @cname('__pyx_fill_contig_strides_array')
17988  */
17989  __Pyx_TraceLine(1186,1,__PYX_ERR(1, 1186, __pyx_L1_error))
17990  __pyx_r = __pyx_v_size;
17991  goto __pyx_L0;
17992 
17993  /* "View.MemoryView":1179
17994  *
17995  * @cname('__pyx_memoryview_slice_get_size')
17996  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
17997  * "Return the size of the memory occupied by the slice in number of bytes"
17998  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
17999  */
18000 
18001  /* function exit code */
18002  __pyx_L1_error:;
18003  __Pyx_WriteUnraisable("View.MemoryView.slice_get_size", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
18004  __pyx_r = 0;
18005  __pyx_L0:;
18006  __Pyx_TraceReturn(Py_None, 1);
18007  return __pyx_r;
18008 }
18009 
18010 /* "View.MemoryView":1189
18011  *
18012  * @cname('__pyx_fill_contig_strides_array')
18013  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
18014  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
18015  * int ndim, char order) nogil:
18016  */
18017 
18018 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
18019  int __pyx_v_idx;
18020  Py_ssize_t __pyx_r;
18021  __Pyx_TraceDeclarations
18022  int __pyx_t_1;
18023  int __pyx_t_2;
18024  int __pyx_t_3;
18025  int __pyx_t_4;
18026  int __pyx_lineno = 0;
18027  const char *__pyx_filename = NULL;
18028  int __pyx_clineno = 0;
18029  __Pyx_TraceCall("fill_contig_strides_array", __pyx_f[1], 1189, 1, __PYX_ERR(1, 1189, __pyx_L1_error));
18030 
18031  /* "View.MemoryView":1198
18032  * cdef int idx
18033  *
18034  * if order == 'F': # <<<<<<<<<<<<<<
18035  * for idx in range(ndim):
18036  * strides[idx] = stride
18037  */
18038  __Pyx_TraceLine(1198,1,__PYX_ERR(1, 1198, __pyx_L1_error))
18039  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
18040  if (__pyx_t_1) {
18041 
18042  /* "View.MemoryView":1199
18043  *
18044  * if order == 'F':
18045  * for idx in range(ndim): # <<<<<<<<<<<<<<
18046  * strides[idx] = stride
18047  * stride *= shape[idx]
18048  */
18049  __Pyx_TraceLine(1199,1,__PYX_ERR(1, 1199, __pyx_L1_error))
18050  __pyx_t_2 = __pyx_v_ndim;
18051  __pyx_t_3 = __pyx_t_2;
18052  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18053  __pyx_v_idx = __pyx_t_4;
18054 
18055  /* "View.MemoryView":1200
18056  * if order == 'F':
18057  * for idx in range(ndim):
18058  * strides[idx] = stride # <<<<<<<<<<<<<<
18059  * stride *= shape[idx]
18060  * else:
18061  */
18062  __Pyx_TraceLine(1200,1,__PYX_ERR(1, 1200, __pyx_L1_error))
18063  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
18064 
18065  /* "View.MemoryView":1201
18066  * for idx in range(ndim):
18067  * strides[idx] = stride
18068  * stride *= shape[idx] # <<<<<<<<<<<<<<
18069  * else:
18070  * for idx in range(ndim - 1, -1, -1):
18071  */
18072  __Pyx_TraceLine(1201,1,__PYX_ERR(1, 1201, __pyx_L1_error))
18073  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
18074  }
18075 
18076  /* "View.MemoryView":1198
18077  * cdef int idx
18078  *
18079  * if order == 'F': # <<<<<<<<<<<<<<
18080  * for idx in range(ndim):
18081  * strides[idx] = stride
18082  */
18083  goto __pyx_L3;
18084  }
18085 
18086  /* "View.MemoryView":1203
18087  * stride *= shape[idx]
18088  * else:
18089  * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
18090  * strides[idx] = stride
18091  * stride *= shape[idx]
18092  */
18093  __Pyx_TraceLine(1203,1,__PYX_ERR(1, 1203, __pyx_L1_error))
18094  /*else*/ {
18095  for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
18096  __pyx_v_idx = __pyx_t_2;
18097 
18098  /* "View.MemoryView":1204
18099  * else:
18100  * for idx in range(ndim - 1, -1, -1):
18101  * strides[idx] = stride # <<<<<<<<<<<<<<
18102  * stride *= shape[idx]
18103  *
18104  */
18105  __Pyx_TraceLine(1204,1,__PYX_ERR(1, 1204, __pyx_L1_error))
18106  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
18107 
18108  /* "View.MemoryView":1205
18109  * for idx in range(ndim - 1, -1, -1):
18110  * strides[idx] = stride
18111  * stride *= shape[idx] # <<<<<<<<<<<<<<
18112  *
18113  * return stride
18114  */
18115  __Pyx_TraceLine(1205,1,__PYX_ERR(1, 1205, __pyx_L1_error))
18116  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
18117  }
18118  }
18119  __pyx_L3:;
18120 
18121  /* "View.MemoryView":1207
18122  * stride *= shape[idx]
18123  *
18124  * return stride # <<<<<<<<<<<<<<
18125  *
18126  * @cname('__pyx_memoryview_copy_data_to_temp')
18127  */
18128  __Pyx_TraceLine(1207,1,__PYX_ERR(1, 1207, __pyx_L1_error))
18129  __pyx_r = __pyx_v_stride;
18130  goto __pyx_L0;
18131 
18132  /* "View.MemoryView":1189
18133  *
18134  * @cname('__pyx_fill_contig_strides_array')
18135  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
18136  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
18137  * int ndim, char order) nogil:
18138  */
18139 
18140  /* function exit code */
18141  __pyx_L1_error:;
18142  __Pyx_WriteUnraisable("View.MemoryView.fill_contig_strides_array", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
18143  __pyx_r = 0;
18144  __pyx_L0:;
18145  __Pyx_TraceReturn(Py_None, 1);
18146  return __pyx_r;
18147 }
18148 
18149 /* "View.MemoryView":1210
18150  *
18151  * @cname('__pyx_memoryview_copy_data_to_temp')
18152  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
18153  * __Pyx_memviewslice *tmpslice,
18154  * char order,
18155  */
18156 
18157 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
18158  int __pyx_v_i;
18159  void *__pyx_v_result;
18160  size_t __pyx_v_itemsize;
18161  size_t __pyx_v_size;
18162  void *__pyx_r;
18163  __Pyx_TraceDeclarations
18164  Py_ssize_t __pyx_t_1;
18165  int __pyx_t_2;
18166  int __pyx_t_3;
18167  struct __pyx_memoryview_obj *__pyx_t_4;
18168  int __pyx_t_5;
18169  int __pyx_t_6;
18170  int __pyx_lineno = 0;
18171  const char *__pyx_filename = NULL;
18172  int __pyx_clineno = 0;
18173  __Pyx_TraceCall("copy_data_to_temp", __pyx_f[1], 1210, 1, __PYX_ERR(1, 1210, __pyx_L1_error));
18174 
18175  /* "View.MemoryView":1221
18176  * cdef void *result
18177  *
18178  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
18179  * cdef size_t size = slice_get_size(src, ndim)
18180  *
18181  */
18182  __Pyx_TraceLine(1221,1,__PYX_ERR(1, 1221, __pyx_L1_error))
18183  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
18184  __pyx_v_itemsize = __pyx_t_1;
18185 
18186  /* "View.MemoryView":1222
18187  *
18188  * cdef size_t itemsize = src.memview.view.itemsize
18189  * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
18190  *
18191  * result = malloc(size)
18192  */
18193  __Pyx_TraceLine(1222,1,__PYX_ERR(1, 1222, __pyx_L1_error))
18194  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
18195 
18196  /* "View.MemoryView":1224
18197  * cdef size_t size = slice_get_size(src, ndim)
18198  *
18199  * result = malloc(size) # <<<<<<<<<<<<<<
18200  * if not result:
18201  * _err(MemoryError, NULL)
18202  */
18203  __Pyx_TraceLine(1224,1,__PYX_ERR(1, 1224, __pyx_L1_error))
18204  __pyx_v_result = malloc(__pyx_v_size);
18205 
18206  /* "View.MemoryView":1225
18207  *
18208  * result = malloc(size)
18209  * if not result: # <<<<<<<<<<<<<<
18210  * _err(MemoryError, NULL)
18211  *
18212  */
18213  __Pyx_TraceLine(1225,1,__PYX_ERR(1, 1225, __pyx_L1_error))
18214  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
18215  if (__pyx_t_2) {
18216 
18217  /* "View.MemoryView":1226
18218  * result = malloc(size)
18219  * if not result:
18220  * _err(MemoryError, NULL) # <<<<<<<<<<<<<<
18221  *
18222  *
18223  */
18224  __Pyx_TraceLine(1226,1,__PYX_ERR(1, 1226, __pyx_L1_error))
18225  __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1226, __pyx_L1_error)
18226 
18227  /* "View.MemoryView":1225
18228  *
18229  * result = malloc(size)
18230  * if not result: # <<<<<<<<<<<<<<
18231  * _err(MemoryError, NULL)
18232  *
18233  */
18234  }
18235 
18236  /* "View.MemoryView":1229
18237  *
18238  *
18239  * tmpslice.data = <char *> result # <<<<<<<<<<<<<<
18240  * tmpslice.memview = src.memview
18241  * for i in range(ndim):
18242  */
18243  __Pyx_TraceLine(1229,1,__PYX_ERR(1, 1229, __pyx_L1_error))
18244  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
18245 
18246  /* "View.MemoryView":1230
18247  *
18248  * tmpslice.data = <char *> result
18249  * tmpslice.memview = src.memview # <<<<<<<<<<<<<<
18250  * for i in range(ndim):
18251  * tmpslice.shape[i] = src.shape[i]
18252  */
18253  __Pyx_TraceLine(1230,1,__PYX_ERR(1, 1230, __pyx_L1_error))
18254  __pyx_t_4 = __pyx_v_src->memview;
18255  __pyx_v_tmpslice->memview = __pyx_t_4;
18256 
18257  /* "View.MemoryView":1231
18258  * tmpslice.data = <char *> result
18259  * tmpslice.memview = src.memview
18260  * for i in range(ndim): # <<<<<<<<<<<<<<
18261  * tmpslice.shape[i] = src.shape[i]
18262  * tmpslice.suboffsets[i] = -1
18263  */
18264  __Pyx_TraceLine(1231,1,__PYX_ERR(1, 1231, __pyx_L1_error))
18265  __pyx_t_3 = __pyx_v_ndim;
18266  __pyx_t_5 = __pyx_t_3;
18267  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
18268  __pyx_v_i = __pyx_t_6;
18269 
18270  /* "View.MemoryView":1232
18271  * tmpslice.memview = src.memview
18272  * for i in range(ndim):
18273  * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
18274  * tmpslice.suboffsets[i] = -1
18275  *
18276  */
18277  __Pyx_TraceLine(1232,1,__PYX_ERR(1, 1232, __pyx_L1_error))
18278  (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
18279 
18280  /* "View.MemoryView":1233
18281  * for i in range(ndim):
18282  * tmpslice.shape[i] = src.shape[i]
18283  * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
18284  *
18285  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
18286  */
18287  __Pyx_TraceLine(1233,1,__PYX_ERR(1, 1233, __pyx_L1_error))
18288  (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
18289  }
18290 
18291  /* "View.MemoryView":1235
18292  * tmpslice.suboffsets[i] = -1
18293  *
18294  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<<
18295  * ndim, order)
18296  *
18297  */
18298  __Pyx_TraceLine(1235,1,__PYX_ERR(1, 1235, __pyx_L1_error))
18299  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
18300 
18301  /* "View.MemoryView":1239
18302  *
18303  *
18304  * for i in range(ndim): # <<<<<<<<<<<<<<
18305  * if tmpslice.shape[i] == 1:
18306  * tmpslice.strides[i] = 0
18307  */
18308  __Pyx_TraceLine(1239,1,__PYX_ERR(1, 1239, __pyx_L1_error))
18309  __pyx_t_3 = __pyx_v_ndim;
18310  __pyx_t_5 = __pyx_t_3;
18311  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
18312  __pyx_v_i = __pyx_t_6;
18313 
18314  /* "View.MemoryView":1240
18315  *
18316  * for i in range(ndim):
18317  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
18318  * tmpslice.strides[i] = 0
18319  *
18320  */
18321  __Pyx_TraceLine(1240,1,__PYX_ERR(1, 1240, __pyx_L1_error))
18322  __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
18323  if (__pyx_t_2) {
18324 
18325  /* "View.MemoryView":1241
18326  * for i in range(ndim):
18327  * if tmpslice.shape[i] == 1:
18328  * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
18329  *
18330  * if slice_is_contig(src[0], order, ndim):
18331  */
18332  __Pyx_TraceLine(1241,1,__PYX_ERR(1, 1241, __pyx_L1_error))
18333  (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
18334 
18335  /* "View.MemoryView":1240
18336  *
18337  * for i in range(ndim):
18338  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
18339  * tmpslice.strides[i] = 0
18340  *
18341  */
18342  }
18343  }
18344 
18345  /* "View.MemoryView":1243
18346  * tmpslice.strides[i] = 0
18347  *
18348  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
18349  * memcpy(result, src.data, size)
18350  * else:
18351  */
18352  __Pyx_TraceLine(1243,1,__PYX_ERR(1, 1243, __pyx_L1_error))
18353  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
18354  if (__pyx_t_2) {
18355 
18356  /* "View.MemoryView":1244
18357  *
18358  * if slice_is_contig(src[0], order, ndim):
18359  * memcpy(result, src.data, size) # <<<<<<<<<<<<<<
18360  * else:
18361  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
18362  */
18363  __Pyx_TraceLine(1244,1,__PYX_ERR(1, 1244, __pyx_L1_error))
18364  (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
18365 
18366  /* "View.MemoryView":1243
18367  * tmpslice.strides[i] = 0
18368  *
18369  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
18370  * memcpy(result, src.data, size)
18371  * else:
18372  */
18373  goto __pyx_L9;
18374  }
18375 
18376  /* "View.MemoryView":1246
18377  * memcpy(result, src.data, size)
18378  * else:
18379  * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
18380  *
18381  * return result
18382  */
18383  __Pyx_TraceLine(1246,1,__PYX_ERR(1, 1246, __pyx_L1_error))
18384  /*else*/ {
18385  copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
18386  }
18387  __pyx_L9:;
18388 
18389  /* "View.MemoryView":1248
18390  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
18391  *
18392  * return result # <<<<<<<<<<<<<<
18393  *
18394  *
18395  */
18396  __Pyx_TraceLine(1248,1,__PYX_ERR(1, 1248, __pyx_L1_error))
18397  __pyx_r = __pyx_v_result;
18398  goto __pyx_L0;
18399 
18400  /* "View.MemoryView":1210
18401  *
18402  * @cname('__pyx_memoryview_copy_data_to_temp')
18403  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
18404  * __Pyx_memviewslice *tmpslice,
18405  * char order,
18406  */
18407 
18408  /* function exit code */
18409  __pyx_L1_error:;
18410  {
18411  #ifdef WITH_THREAD
18412  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18413  #endif
18414  __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
18415  #ifdef WITH_THREAD
18416  __Pyx_PyGILState_Release(__pyx_gilstate_save);
18417  #endif
18418  }
18419  __pyx_r = NULL;
18420  __pyx_L0:;
18421  __Pyx_TraceReturn(Py_None, 1);
18422  return __pyx_r;
18423 }
18424 
18425 /* "View.MemoryView":1253
18426  *
18427  * @cname('__pyx_memoryview_err_extents')
18428  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
18429  * Py_ssize_t extent2) except -1 with gil:
18430  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
18431  */
18432 
18433 static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
18434  int __pyx_r;
18435  __Pyx_TraceDeclarations
18436  __Pyx_RefNannyDeclarations
18437  PyObject *__pyx_t_1 = NULL;
18438  PyObject *__pyx_t_2 = NULL;
18439  PyObject *__pyx_t_3 = NULL;
18440  PyObject *__pyx_t_4 = NULL;
18441  int __pyx_lineno = 0;
18442  const char *__pyx_filename = NULL;
18443  int __pyx_clineno = 0;
18444  #ifdef WITH_THREAD
18445  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18446  #endif
18447  __Pyx_RefNannySetupContext("_err_extents", 0);
18448  __Pyx_TraceCall("_err_extents", __pyx_f[1], 1253, 0, __PYX_ERR(1, 1253, __pyx_L1_error));
18449 
18450  /* "View.MemoryView":1256
18451  * Py_ssize_t extent2) except -1 with gil:
18452  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
18453  * (i, extent1, extent2)) # <<<<<<<<<<<<<<
18454  *
18455  * @cname('__pyx_memoryview_err_dim')
18456  */
18457  __Pyx_TraceLine(1256,0,__PYX_ERR(1, 1256, __pyx_L1_error))
18458  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1256, __pyx_L1_error)
18459  __Pyx_GOTREF(__pyx_t_1);
18460  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1256, __pyx_L1_error)
18461  __Pyx_GOTREF(__pyx_t_2);
18462  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1256, __pyx_L1_error)
18463  __Pyx_GOTREF(__pyx_t_3);
18464  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1256, __pyx_L1_error)
18465  __Pyx_GOTREF(__pyx_t_4);
18466  __Pyx_GIVEREF(__pyx_t_1);
18467  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
18468  __Pyx_GIVEREF(__pyx_t_2);
18469  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
18470  __Pyx_GIVEREF(__pyx_t_3);
18471  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
18472  __pyx_t_1 = 0;
18473  __pyx_t_2 = 0;
18474  __pyx_t_3 = 0;
18475 
18476  /* "View.MemoryView":1255
18477  * cdef int _err_extents(int i, Py_ssize_t extent1,
18478  * Py_ssize_t extent2) except -1 with gil:
18479  * raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<<
18480  * (i, extent1, extent2))
18481  *
18482  */
18483  __Pyx_TraceLine(1255,0,__PYX_ERR(1, 1255, __pyx_L1_error))
18484  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1255, __pyx_L1_error)
18485  __Pyx_GOTREF(__pyx_t_3);
18486  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18487  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1255, __pyx_L1_error)
18488  __Pyx_GOTREF(__pyx_t_4);
18489  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18490  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
18491  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18492  __PYX_ERR(1, 1255, __pyx_L1_error)
18493 
18494  /* "View.MemoryView":1253
18495  *
18496  * @cname('__pyx_memoryview_err_extents')
18497  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
18498  * Py_ssize_t extent2) except -1 with gil:
18499  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
18500  */
18501 
18502  /* function exit code */
18503  __pyx_L1_error:;
18504  __Pyx_XDECREF(__pyx_t_1);
18505  __Pyx_XDECREF(__pyx_t_2);
18506  __Pyx_XDECREF(__pyx_t_3);
18507  __Pyx_XDECREF(__pyx_t_4);
18508  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
18509  __pyx_r = -1;
18510  __Pyx_TraceReturn(Py_None, 0);
18511  __Pyx_RefNannyFinishContext();
18512  #ifdef WITH_THREAD
18513  __Pyx_PyGILState_Release(__pyx_gilstate_save);
18514  #endif
18515  return __pyx_r;
18516 }
18517 
18518 /* "View.MemoryView":1259
18519  *
18520  * @cname('__pyx_memoryview_err_dim')
18521  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
18522  * raise error(msg.decode('ascii') % dim)
18523  *
18524  */
18525 
18526 static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
18527  int __pyx_r;
18528  __Pyx_TraceDeclarations
18529  __Pyx_RefNannyDeclarations
18530  PyObject *__pyx_t_1 = NULL;
18531  PyObject *__pyx_t_2 = NULL;
18532  PyObject *__pyx_t_3 = NULL;
18533  PyObject *__pyx_t_4 = NULL;
18534  int __pyx_lineno = 0;
18535  const char *__pyx_filename = NULL;
18536  int __pyx_clineno = 0;
18537  #ifdef WITH_THREAD
18538  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18539  #endif
18540  __Pyx_RefNannySetupContext("_err_dim", 0);
18541  __Pyx_TraceCall("_err_dim", __pyx_f[1], 1259, 0, __PYX_ERR(1, 1259, __pyx_L1_error));
18542  __Pyx_INCREF(__pyx_v_error);
18543 
18544  /* "View.MemoryView":1260
18545  * @cname('__pyx_memoryview_err_dim')
18546  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
18547  * raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<<
18548  *
18549  * @cname('__pyx_memoryview_err')
18550  */
18551  __Pyx_TraceLine(1260,0,__PYX_ERR(1, 1260, __pyx_L1_error))
18552  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1260, __pyx_L1_error)
18553  __Pyx_GOTREF(__pyx_t_2);
18554  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1260, __pyx_L1_error)
18555  __Pyx_GOTREF(__pyx_t_3);
18556  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1260, __pyx_L1_error)
18557  __Pyx_GOTREF(__pyx_t_4);
18558  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18559  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18560  __Pyx_INCREF(__pyx_v_error);
18561  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
18562  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
18563  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
18564  if (likely(__pyx_t_2)) {
18565  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
18566  __Pyx_INCREF(__pyx_t_2);
18567  __Pyx_INCREF(function);
18568  __Pyx_DECREF_SET(__pyx_t_3, function);
18569  }
18570  }
18571  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
18572  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
18573  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18574  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1260, __pyx_L1_error)
18575  __Pyx_GOTREF(__pyx_t_1);
18576  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18577  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
18578  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18579  __PYX_ERR(1, 1260, __pyx_L1_error)
18580 
18581  /* "View.MemoryView":1259
18582  *
18583  * @cname('__pyx_memoryview_err_dim')
18584  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
18585  * raise error(msg.decode('ascii') % dim)
18586  *
18587  */
18588 
18589  /* function exit code */
18590  __pyx_L1_error:;
18591  __Pyx_XDECREF(__pyx_t_1);
18592  __Pyx_XDECREF(__pyx_t_2);
18593  __Pyx_XDECREF(__pyx_t_3);
18594  __Pyx_XDECREF(__pyx_t_4);
18595  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
18596  __pyx_r = -1;
18597  __Pyx_XDECREF(__pyx_v_error);
18598  __Pyx_TraceReturn(Py_None, 0);
18599  __Pyx_RefNannyFinishContext();
18600  #ifdef WITH_THREAD
18601  __Pyx_PyGILState_Release(__pyx_gilstate_save);
18602  #endif
18603  return __pyx_r;
18604 }
18605 
18606 /* "View.MemoryView":1263
18607  *
18608  * @cname('__pyx_memoryview_err')
18609  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
18610  * if msg != NULL:
18611  * raise error(msg.decode('ascii'))
18612  */
18613 
18614 static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
18615  int __pyx_r;
18616  __Pyx_TraceDeclarations
18617  __Pyx_RefNannyDeclarations
18618  int __pyx_t_1;
18619  PyObject *__pyx_t_2 = NULL;
18620  PyObject *__pyx_t_3 = NULL;
18621  PyObject *__pyx_t_4 = NULL;
18622  PyObject *__pyx_t_5 = NULL;
18623  int __pyx_lineno = 0;
18624  const char *__pyx_filename = NULL;
18625  int __pyx_clineno = 0;
18626  #ifdef WITH_THREAD
18627  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18628  #endif
18629  __Pyx_RefNannySetupContext("_err", 0);
18630  __Pyx_TraceCall("_err", __pyx_f[1], 1263, 0, __PYX_ERR(1, 1263, __pyx_L1_error));
18631  __Pyx_INCREF(__pyx_v_error);
18632 
18633  /* "View.MemoryView":1264
18634  * @cname('__pyx_memoryview_err')
18635  * cdef int _err(object error, char *msg) except -1 with gil:
18636  * if msg != NULL: # <<<<<<<<<<<<<<
18637  * raise error(msg.decode('ascii'))
18638  * else:
18639  */
18640  __Pyx_TraceLine(1264,0,__PYX_ERR(1, 1264, __pyx_L1_error))
18641  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
18642  if (unlikely(__pyx_t_1)) {
18643 
18644  /* "View.MemoryView":1265
18645  * cdef int _err(object error, char *msg) except -1 with gil:
18646  * if msg != NULL:
18647  * raise error(msg.decode('ascii')) # <<<<<<<<<<<<<<
18648  * else:
18649  * raise error
18650  */
18651  __Pyx_TraceLine(1265,0,__PYX_ERR(1, 1265, __pyx_L1_error))
18652  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1265, __pyx_L1_error)
18653  __Pyx_GOTREF(__pyx_t_3);
18654  __Pyx_INCREF(__pyx_v_error);
18655  __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
18656  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
18657  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
18658  if (likely(__pyx_t_5)) {
18659  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18660  __Pyx_INCREF(__pyx_t_5);
18661  __Pyx_INCREF(function);
18662  __Pyx_DECREF_SET(__pyx_t_4, function);
18663  }
18664  }
18665  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
18666  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18667  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18668  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1265, __pyx_L1_error)
18669  __Pyx_GOTREF(__pyx_t_2);
18670  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18671  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18672  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18673  __PYX_ERR(1, 1265, __pyx_L1_error)
18674 
18675  /* "View.MemoryView":1264
18676  * @cname('__pyx_memoryview_err')
18677  * cdef int _err(object error, char *msg) except -1 with gil:
18678  * if msg != NULL: # <<<<<<<<<<<<<<
18679  * raise error(msg.decode('ascii'))
18680  * else:
18681  */
18682  }
18683 
18684  /* "View.MemoryView":1267
18685  * raise error(msg.decode('ascii'))
18686  * else:
18687  * raise error # <<<<<<<<<<<<<<
18688  *
18689  * @cname('__pyx_memoryview_copy_contents')
18690  */
18691  __Pyx_TraceLine(1267,0,__PYX_ERR(1, 1267, __pyx_L1_error))
18692  /*else*/ {
18693  __Pyx_Raise(__pyx_v_error, 0, 0, 0);
18694  __PYX_ERR(1, 1267, __pyx_L1_error)
18695  }
18696 
18697  /* "View.MemoryView":1263
18698  *
18699  * @cname('__pyx_memoryview_err')
18700  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
18701  * if msg != NULL:
18702  * raise error(msg.decode('ascii'))
18703  */
18704 
18705  /* function exit code */
18706  __pyx_L1_error:;
18707  __Pyx_XDECREF(__pyx_t_2);
18708  __Pyx_XDECREF(__pyx_t_3);
18709  __Pyx_XDECREF(__pyx_t_4);
18710  __Pyx_XDECREF(__pyx_t_5);
18711  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
18712  __pyx_r = -1;
18713  __Pyx_XDECREF(__pyx_v_error);
18714  __Pyx_TraceReturn(Py_None, 0);
18715  __Pyx_RefNannyFinishContext();
18716  #ifdef WITH_THREAD
18717  __Pyx_PyGILState_Release(__pyx_gilstate_save);
18718  #endif
18719  return __pyx_r;
18720 }
18721 
18722 /* "View.MemoryView":1270
18723  *
18724  * @cname('__pyx_memoryview_copy_contents')
18725  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
18726  * __Pyx_memviewslice dst,
18727  * int src_ndim, int dst_ndim,
18728  */
18729 
18730 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
18731  void *__pyx_v_tmpdata;
18732  size_t __pyx_v_itemsize;
18733  int __pyx_v_i;
18734  char __pyx_v_order;
18735  int __pyx_v_broadcasting;
18736  int __pyx_v_direct_copy;
18737  __Pyx_memviewslice __pyx_v_tmp;
18738  int __pyx_v_ndim;
18739  int __pyx_r;
18740  __Pyx_TraceDeclarations
18741  Py_ssize_t __pyx_t_1;
18742  int __pyx_t_2;
18743  int __pyx_t_3;
18744  int __pyx_t_4;
18745  int __pyx_t_5;
18746  int __pyx_t_6;
18747  void *__pyx_t_7;
18748  int __pyx_t_8;
18749  int __pyx_lineno = 0;
18750  const char *__pyx_filename = NULL;
18751  int __pyx_clineno = 0;
18752  __Pyx_TraceCall("memoryview_copy_contents", __pyx_f[1], 1270, 1, __PYX_ERR(1, 1270, __pyx_L1_error));
18753 
18754  /* "View.MemoryView":1278
18755  * Check for overlapping memory and verify the shapes.
18756  * """
18757  * cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
18758  * cdef size_t itemsize = src.memview.view.itemsize
18759  * cdef int i
18760  */
18761  __Pyx_TraceLine(1278,1,__PYX_ERR(1, 1278, __pyx_L1_error))
18762  __pyx_v_tmpdata = NULL;
18763 
18764  /* "View.MemoryView":1279
18765  * """
18766  * cdef void *tmpdata = NULL
18767  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
18768  * cdef int i
18769  * cdef char order = get_best_order(&src, src_ndim)
18770  */
18771  __Pyx_TraceLine(1279,1,__PYX_ERR(1, 1279, __pyx_L1_error))
18772  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
18773  __pyx_v_itemsize = __pyx_t_1;
18774 
18775  /* "View.MemoryView":1281
18776  * cdef size_t itemsize = src.memview.view.itemsize
18777  * cdef int i
18778  * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
18779  * cdef bint broadcasting = False
18780  * cdef bint direct_copy = False
18781  */
18782  __Pyx_TraceLine(1281,1,__PYX_ERR(1, 1281, __pyx_L1_error))
18783  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
18784 
18785  /* "View.MemoryView":1282
18786  * cdef int i
18787  * cdef char order = get_best_order(&src, src_ndim)
18788  * cdef bint broadcasting = False # <<<<<<<<<<<<<<
18789  * cdef bint direct_copy = False
18790  * cdef __Pyx_memviewslice tmp
18791  */
18792  __Pyx_TraceLine(1282,1,__PYX_ERR(1, 1282, __pyx_L1_error))
18793  __pyx_v_broadcasting = 0;
18794 
18795  /* "View.MemoryView":1283
18796  * cdef char order = get_best_order(&src, src_ndim)
18797  * cdef bint broadcasting = False
18798  * cdef bint direct_copy = False # <<<<<<<<<<<<<<
18799  * cdef __Pyx_memviewslice tmp
18800  *
18801  */
18802  __Pyx_TraceLine(1283,1,__PYX_ERR(1, 1283, __pyx_L1_error))
18803  __pyx_v_direct_copy = 0;
18804 
18805  /* "View.MemoryView":1286
18806  * cdef __Pyx_memviewslice tmp
18807  *
18808  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
18809  * broadcast_leading(&src, src_ndim, dst_ndim)
18810  * elif dst_ndim < src_ndim:
18811  */
18812  __Pyx_TraceLine(1286,1,__PYX_ERR(1, 1286, __pyx_L1_error))
18813  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
18814  if (__pyx_t_2) {
18815 
18816  /* "View.MemoryView":1287
18817  *
18818  * if src_ndim < dst_ndim:
18819  * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
18820  * elif dst_ndim < src_ndim:
18821  * broadcast_leading(&dst, dst_ndim, src_ndim)
18822  */
18823  __Pyx_TraceLine(1287,1,__PYX_ERR(1, 1287, __pyx_L1_error))
18824  __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
18825 
18826  /* "View.MemoryView":1286
18827  * cdef __Pyx_memviewslice tmp
18828  *
18829  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
18830  * broadcast_leading(&src, src_ndim, dst_ndim)
18831  * elif dst_ndim < src_ndim:
18832  */
18833  goto __pyx_L3;
18834  }
18835 
18836  /* "View.MemoryView":1288
18837  * if src_ndim < dst_ndim:
18838  * broadcast_leading(&src, src_ndim, dst_ndim)
18839  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
18840  * broadcast_leading(&dst, dst_ndim, src_ndim)
18841  *
18842  */
18843  __Pyx_TraceLine(1288,1,__PYX_ERR(1, 1288, __pyx_L1_error))
18844  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
18845  if (__pyx_t_2) {
18846 
18847  /* "View.MemoryView":1289
18848  * broadcast_leading(&src, src_ndim, dst_ndim)
18849  * elif dst_ndim < src_ndim:
18850  * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
18851  *
18852  * cdef int ndim = max(src_ndim, dst_ndim)
18853  */
18854  __Pyx_TraceLine(1289,1,__PYX_ERR(1, 1289, __pyx_L1_error))
18855  __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
18856 
18857  /* "View.MemoryView":1288
18858  * if src_ndim < dst_ndim:
18859  * broadcast_leading(&src, src_ndim, dst_ndim)
18860  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
18861  * broadcast_leading(&dst, dst_ndim, src_ndim)
18862  *
18863  */
18864  }
18865  __pyx_L3:;
18866 
18867  /* "View.MemoryView":1291
18868  * broadcast_leading(&dst, dst_ndim, src_ndim)
18869  *
18870  * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
18871  *
18872  * for i in range(ndim):
18873  */
18874  __Pyx_TraceLine(1291,1,__PYX_ERR(1, 1291, __pyx_L1_error))
18875  __pyx_t_3 = __pyx_v_dst_ndim;
18876  __pyx_t_4 = __pyx_v_src_ndim;
18877  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
18878  __pyx_t_5 = __pyx_t_3;
18879  } else {
18880  __pyx_t_5 = __pyx_t_4;
18881  }
18882  __pyx_v_ndim = __pyx_t_5;
18883 
18884  /* "View.MemoryView":1293
18885  * cdef int ndim = max(src_ndim, dst_ndim)
18886  *
18887  * for i in range(ndim): # <<<<<<<<<<<<<<
18888  * if src.shape[i] != dst.shape[i]:
18889  * if src.shape[i] == 1:
18890  */
18891  __Pyx_TraceLine(1293,1,__PYX_ERR(1, 1293, __pyx_L1_error))
18892  __pyx_t_5 = __pyx_v_ndim;
18893  __pyx_t_3 = __pyx_t_5;
18894  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18895  __pyx_v_i = __pyx_t_4;
18896 
18897  /* "View.MemoryView":1294
18898  *
18899  * for i in range(ndim):
18900  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
18901  * if src.shape[i] == 1:
18902  * broadcasting = True
18903  */
18904  __Pyx_TraceLine(1294,1,__PYX_ERR(1, 1294, __pyx_L1_error))
18905  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
18906  if (__pyx_t_2) {
18907 
18908  /* "View.MemoryView":1295
18909  * for i in range(ndim):
18910  * if src.shape[i] != dst.shape[i]:
18911  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
18912  * broadcasting = True
18913  * src.strides[i] = 0
18914  */
18915  __Pyx_TraceLine(1295,1,__PYX_ERR(1, 1295, __pyx_L1_error))
18916  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
18917  if (__pyx_t_2) {
18918 
18919  /* "View.MemoryView":1296
18920  * if src.shape[i] != dst.shape[i]:
18921  * if src.shape[i] == 1:
18922  * broadcasting = True # <<<<<<<<<<<<<<
18923  * src.strides[i] = 0
18924  * else:
18925  */
18926  __Pyx_TraceLine(1296,1,__PYX_ERR(1, 1296, __pyx_L1_error))
18927  __pyx_v_broadcasting = 1;
18928 
18929  /* "View.MemoryView":1297
18930  * if src.shape[i] == 1:
18931  * broadcasting = True
18932  * src.strides[i] = 0 # <<<<<<<<<<<<<<
18933  * else:
18934  * _err_extents(i, dst.shape[i], src.shape[i])
18935  */
18936  __Pyx_TraceLine(1297,1,__PYX_ERR(1, 1297, __pyx_L1_error))
18937  (__pyx_v_src.strides[__pyx_v_i]) = 0;
18938 
18939  /* "View.MemoryView":1295
18940  * for i in range(ndim):
18941  * if src.shape[i] != dst.shape[i]:
18942  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
18943  * broadcasting = True
18944  * src.strides[i] = 0
18945  */
18946  goto __pyx_L7;
18947  }
18948 
18949  /* "View.MemoryView":1299
18950  * src.strides[i] = 0
18951  * else:
18952  * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
18953  *
18954  * if src.suboffsets[i] >= 0:
18955  */
18956  __Pyx_TraceLine(1299,1,__PYX_ERR(1, 1299, __pyx_L1_error))
18957  /*else*/ {
18958  __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1299, __pyx_L1_error)
18959  }
18960  __pyx_L7:;
18961 
18962  /* "View.MemoryView":1294
18963  *
18964  * for i in range(ndim):
18965  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
18966  * if src.shape[i] == 1:
18967  * broadcasting = True
18968  */
18969  }
18970 
18971  /* "View.MemoryView":1301
18972  * _err_extents(i, dst.shape[i], src.shape[i])
18973  *
18974  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
18975  * _err_dim(ValueError, "Dimension %d is not direct", i)
18976  *
18977  */
18978  __Pyx_TraceLine(1301,1,__PYX_ERR(1, 1301, __pyx_L1_error))
18979  __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
18980  if (__pyx_t_2) {
18981 
18982  /* "View.MemoryView":1302
18983  *
18984  * if src.suboffsets[i] >= 0:
18985  * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
18986  *
18987  * if slices_overlap(&src, &dst, ndim, itemsize):
18988  */
18989  __Pyx_TraceLine(1302,1,__PYX_ERR(1, 1302, __pyx_L1_error))
18990  __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1302, __pyx_L1_error)
18991 
18992  /* "View.MemoryView":1301
18993  * _err_extents(i, dst.shape[i], src.shape[i])
18994  *
18995  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
18996  * _err_dim(ValueError, "Dimension %d is not direct", i)
18997  *
18998  */
18999  }
19000  }
19001 
19002  /* "View.MemoryView":1304
19003  * _err_dim(ValueError, "Dimension %d is not direct", i)
19004  *
19005  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
19006  *
19007  * if not slice_is_contig(src, order, ndim):
19008  */
19009  __Pyx_TraceLine(1304,1,__PYX_ERR(1, 1304, __pyx_L1_error))
19010  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
19011  if (__pyx_t_2) {
19012 
19013  /* "View.MemoryView":1306
19014  * if slices_overlap(&src, &dst, ndim, itemsize):
19015  *
19016  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
19017  * order = get_best_order(&dst, ndim)
19018  *
19019  */
19020  __Pyx_TraceLine(1306,1,__PYX_ERR(1, 1306, __pyx_L1_error))
19021  __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
19022  if (__pyx_t_2) {
19023 
19024  /* "View.MemoryView":1307
19025  *
19026  * if not slice_is_contig(src, order, ndim):
19027  * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
19028  *
19029  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
19030  */
19031  __Pyx_TraceLine(1307,1,__PYX_ERR(1, 1307, __pyx_L1_error))
19032  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
19033 
19034  /* "View.MemoryView":1306
19035  * if slices_overlap(&src, &dst, ndim, itemsize):
19036  *
19037  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
19038  * order = get_best_order(&dst, ndim)
19039  *
19040  */
19041  }
19042 
19043  /* "View.MemoryView":1309
19044  * order = get_best_order(&dst, ndim)
19045  *
19046  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
19047  * src = tmp
19048  *
19049  */
19050  __Pyx_TraceLine(1309,1,__PYX_ERR(1, 1309, __pyx_L1_error))
19051  __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1309, __pyx_L1_error)
19052  __pyx_v_tmpdata = __pyx_t_7;
19053 
19054  /* "View.MemoryView":1310
19055  *
19056  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
19057  * src = tmp # <<<<<<<<<<<<<<
19058  *
19059  * if not broadcasting:
19060  */
19061  __Pyx_TraceLine(1310,1,__PYX_ERR(1, 1310, __pyx_L1_error))
19062  __pyx_v_src = __pyx_v_tmp;
19063 
19064  /* "View.MemoryView":1304
19065  * _err_dim(ValueError, "Dimension %d is not direct", i)
19066  *
19067  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
19068  *
19069  * if not slice_is_contig(src, order, ndim):
19070  */
19071  }
19072 
19073  /* "View.MemoryView":1312
19074  * src = tmp
19075  *
19076  * if not broadcasting: # <<<<<<<<<<<<<<
19077  *
19078  *
19079  */
19080  __Pyx_TraceLine(1312,1,__PYX_ERR(1, 1312, __pyx_L1_error))
19081  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
19082  if (__pyx_t_2) {
19083 
19084  /* "View.MemoryView":1315
19085  *
19086  *
19087  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
19088  * direct_copy = slice_is_contig(dst, 'C', ndim)
19089  * elif slice_is_contig(src, 'F', ndim):
19090  */
19091  __Pyx_TraceLine(1315,1,__PYX_ERR(1, 1315, __pyx_L1_error))
19092  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
19093  if (__pyx_t_2) {
19094 
19095  /* "View.MemoryView":1316
19096  *
19097  * if slice_is_contig(src, 'C', ndim):
19098  * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
19099  * elif slice_is_contig(src, 'F', ndim):
19100  * direct_copy = slice_is_contig(dst, 'F', ndim)
19101  */
19102  __Pyx_TraceLine(1316,1,__PYX_ERR(1, 1316, __pyx_L1_error))
19103  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
19104 
19105  /* "View.MemoryView":1315
19106  *
19107  *
19108  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
19109  * direct_copy = slice_is_contig(dst, 'C', ndim)
19110  * elif slice_is_contig(src, 'F', ndim):
19111  */
19112  goto __pyx_L12;
19113  }
19114 
19115  /* "View.MemoryView":1317
19116  * if slice_is_contig(src, 'C', ndim):
19117  * direct_copy = slice_is_contig(dst, 'C', ndim)
19118  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
19119  * direct_copy = slice_is_contig(dst, 'F', ndim)
19120  *
19121  */
19122  __Pyx_TraceLine(1317,1,__PYX_ERR(1, 1317, __pyx_L1_error))
19123  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
19124  if (__pyx_t_2) {
19125 
19126  /* "View.MemoryView":1318
19127  * direct_copy = slice_is_contig(dst, 'C', ndim)
19128  * elif slice_is_contig(src, 'F', ndim):
19129  * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
19130  *
19131  * if direct_copy:
19132  */
19133  __Pyx_TraceLine(1318,1,__PYX_ERR(1, 1318, __pyx_L1_error))
19134  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
19135 
19136  /* "View.MemoryView":1317
19137  * if slice_is_contig(src, 'C', ndim):
19138  * direct_copy = slice_is_contig(dst, 'C', ndim)
19139  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
19140  * direct_copy = slice_is_contig(dst, 'F', ndim)
19141  *
19142  */
19143  }
19144  __pyx_L12:;
19145 
19146  /* "View.MemoryView":1320
19147  * direct_copy = slice_is_contig(dst, 'F', ndim)
19148  *
19149  * if direct_copy: # <<<<<<<<<<<<<<
19150  *
19151  * refcount_copying(&dst, dtype_is_object, ndim, False)
19152  */
19153  __Pyx_TraceLine(1320,1,__PYX_ERR(1, 1320, __pyx_L1_error))
19154  __pyx_t_2 = (__pyx_v_direct_copy != 0);
19155  if (__pyx_t_2) {
19156 
19157  /* "View.MemoryView":1322
19158  * if direct_copy:
19159  *
19160  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
19161  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
19162  * refcount_copying(&dst, dtype_is_object, ndim, True)
19163  */
19164  __Pyx_TraceLine(1322,1,__PYX_ERR(1, 1322, __pyx_L1_error))
19165  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
19166 
19167  /* "View.MemoryView":1323
19168  *
19169  * refcount_copying(&dst, dtype_is_object, ndim, False)
19170  * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
19171  * refcount_copying(&dst, dtype_is_object, ndim, True)
19172  * free(tmpdata)
19173  */
19174  __Pyx_TraceLine(1323,1,__PYX_ERR(1, 1323, __pyx_L1_error))
19175  (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
19176 
19177  /* "View.MemoryView":1324
19178  * refcount_copying(&dst, dtype_is_object, ndim, False)
19179  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
19180  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
19181  * free(tmpdata)
19182  * return 0
19183  */
19184  __Pyx_TraceLine(1324,1,__PYX_ERR(1, 1324, __pyx_L1_error))
19185  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
19186 
19187  /* "View.MemoryView":1325
19188  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
19189  * refcount_copying(&dst, dtype_is_object, ndim, True)
19190  * free(tmpdata) # <<<<<<<<<<<<<<
19191  * return 0
19192  *
19193  */
19194  __Pyx_TraceLine(1325,1,__PYX_ERR(1, 1325, __pyx_L1_error))
19195  free(__pyx_v_tmpdata);
19196 
19197  /* "View.MemoryView":1326
19198  * refcount_copying(&dst, dtype_is_object, ndim, True)
19199  * free(tmpdata)
19200  * return 0 # <<<<<<<<<<<<<<
19201  *
19202  * if order == 'F' == get_best_order(&dst, ndim):
19203  */
19204  __Pyx_TraceLine(1326,1,__PYX_ERR(1, 1326, __pyx_L1_error))
19205  __pyx_r = 0;
19206  goto __pyx_L0;
19207 
19208  /* "View.MemoryView":1320
19209  * direct_copy = slice_is_contig(dst, 'F', ndim)
19210  *
19211  * if direct_copy: # <<<<<<<<<<<<<<
19212  *
19213  * refcount_copying(&dst, dtype_is_object, ndim, False)
19214  */
19215  }
19216 
19217  /* "View.MemoryView":1312
19218  * src = tmp
19219  *
19220  * if not broadcasting: # <<<<<<<<<<<<<<
19221  *
19222  *
19223  */
19224  }
19225 
19226  /* "View.MemoryView":1328
19227  * return 0
19228  *
19229  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
19230  *
19231  *
19232  */
19233  __Pyx_TraceLine(1328,1,__PYX_ERR(1, 1328, __pyx_L1_error))
19234  __pyx_t_2 = (__pyx_v_order == 'F');
19235  if (__pyx_t_2) {
19236  __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
19237  }
19238  __pyx_t_8 = (__pyx_t_2 != 0);
19239  if (__pyx_t_8) {
19240 
19241  /* "View.MemoryView":1331
19242  *
19243  *
19244  * transpose_memslice(&src) # <<<<<<<<<<<<<<
19245  * transpose_memslice(&dst)
19246  *
19247  */
19248  __Pyx_TraceLine(1331,1,__PYX_ERR(1, 1331, __pyx_L1_error))
19249  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1331, __pyx_L1_error)
19250 
19251  /* "View.MemoryView":1332
19252  *
19253  * transpose_memslice(&src)
19254  * transpose_memslice(&dst) # <<<<<<<<<<<<<<
19255  *
19256  * refcount_copying(&dst, dtype_is_object, ndim, False)
19257  */
19258  __Pyx_TraceLine(1332,1,__PYX_ERR(1, 1332, __pyx_L1_error))
19259  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1332, __pyx_L1_error)
19260 
19261  /* "View.MemoryView":1328
19262  * return 0
19263  *
19264  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
19265  *
19266  *
19267  */
19268  }
19269 
19270  /* "View.MemoryView":1334
19271  * transpose_memslice(&dst)
19272  *
19273  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
19274  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
19275  * refcount_copying(&dst, dtype_is_object, ndim, True)
19276  */
19277  __Pyx_TraceLine(1334,1,__PYX_ERR(1, 1334, __pyx_L1_error))
19278  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
19279 
19280  /* "View.MemoryView":1335
19281  *
19282  * refcount_copying(&dst, dtype_is_object, ndim, False)
19283  * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
19284  * refcount_copying(&dst, dtype_is_object, ndim, True)
19285  *
19286  */
19287  __Pyx_TraceLine(1335,1,__PYX_ERR(1, 1335, __pyx_L1_error))
19288  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
19289 
19290  /* "View.MemoryView":1336
19291  * refcount_copying(&dst, dtype_is_object, ndim, False)
19292  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
19293  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
19294  *
19295  * free(tmpdata)
19296  */
19297  __Pyx_TraceLine(1336,1,__PYX_ERR(1, 1336, __pyx_L1_error))
19298  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
19299 
19300  /* "View.MemoryView":1338
19301  * refcount_copying(&dst, dtype_is_object, ndim, True)
19302  *
19303  * free(tmpdata) # <<<<<<<<<<<<<<
19304  * return 0
19305  *
19306  */
19307  __Pyx_TraceLine(1338,1,__PYX_ERR(1, 1338, __pyx_L1_error))
19308  free(__pyx_v_tmpdata);
19309 
19310  /* "View.MemoryView":1339
19311  *
19312  * free(tmpdata)
19313  * return 0 # <<<<<<<<<<<<<<
19314  *
19315  * @cname('__pyx_memoryview_broadcast_leading')
19316  */
19317  __Pyx_TraceLine(1339,1,__PYX_ERR(1, 1339, __pyx_L1_error))
19318  __pyx_r = 0;
19319  goto __pyx_L0;
19320 
19321  /* "View.MemoryView":1270
19322  *
19323  * @cname('__pyx_memoryview_copy_contents')
19324  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
19325  * __Pyx_memviewslice dst,
19326  * int src_ndim, int dst_ndim,
19327  */
19328 
19329  /* function exit code */
19330  __pyx_L1_error:;
19331  {
19332  #ifdef WITH_THREAD
19333  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
19334  #endif
19335  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
19336  #ifdef WITH_THREAD
19337  __Pyx_PyGILState_Release(__pyx_gilstate_save);
19338  #endif
19339  }
19340  __pyx_r = -1;
19341  __pyx_L0:;
19342  __Pyx_TraceReturn(Py_None, 1);
19343  return __pyx_r;
19344 }
19345 
19346 /* "View.MemoryView":1342
19347  *
19348  * @cname('__pyx_memoryview_broadcast_leading')
19349  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
19350  * int ndim,
19351  * int ndim_other) nogil:
19352  */
19353 
19354 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
19355  int __pyx_v_i;
19356  int __pyx_v_offset;
19357  __Pyx_TraceDeclarations
19358  int __pyx_t_1;
19359  int __pyx_t_2;
19360  int __pyx_t_3;
19361  int __pyx_lineno = 0;
19362  const char *__pyx_filename = NULL;
19363  int __pyx_clineno = 0;
19364  __Pyx_TraceCall("broadcast_leading", __pyx_f[1], 1342, 1, __PYX_ERR(1, 1342, __pyx_L1_error));
19365 
19366  /* "View.MemoryView":1346
19367  * int ndim_other) nogil:
19368  * cdef int i
19369  * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
19370  *
19371  * for i in range(ndim - 1, -1, -1):
19372  */
19373  __Pyx_TraceLine(1346,1,__PYX_ERR(1, 1346, __pyx_L1_error))
19374  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
19375 
19376  /* "View.MemoryView":1348
19377  * cdef int offset = ndim_other - ndim
19378  *
19379  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
19380  * mslice.shape[i + offset] = mslice.shape[i]
19381  * mslice.strides[i + offset] = mslice.strides[i]
19382  */
19383  __Pyx_TraceLine(1348,1,__PYX_ERR(1, 1348, __pyx_L1_error))
19384  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
19385  __pyx_v_i = __pyx_t_1;
19386 
19387  /* "View.MemoryView":1349
19388  *
19389  * for i in range(ndim - 1, -1, -1):
19390  * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
19391  * mslice.strides[i + offset] = mslice.strides[i]
19392  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
19393  */
19394  __Pyx_TraceLine(1349,1,__PYX_ERR(1, 1349, __pyx_L1_error))
19395  (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
19396 
19397  /* "View.MemoryView":1350
19398  * for i in range(ndim - 1, -1, -1):
19399  * mslice.shape[i + offset] = mslice.shape[i]
19400  * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
19401  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
19402  *
19403  */
19404  __Pyx_TraceLine(1350,1,__PYX_ERR(1, 1350, __pyx_L1_error))
19405  (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
19406 
19407  /* "View.MemoryView":1351
19408  * mslice.shape[i + offset] = mslice.shape[i]
19409  * mslice.strides[i + offset] = mslice.strides[i]
19410  * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
19411  *
19412  * for i in range(offset):
19413  */
19414  __Pyx_TraceLine(1351,1,__PYX_ERR(1, 1351, __pyx_L1_error))
19415  (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
19416  }
19417 
19418  /* "View.MemoryView":1353
19419  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
19420  *
19421  * for i in range(offset): # <<<<<<<<<<<<<<
19422  * mslice.shape[i] = 1
19423  * mslice.strides[i] = mslice.strides[0]
19424  */
19425  __Pyx_TraceLine(1353,1,__PYX_ERR(1, 1353, __pyx_L1_error))
19426  __pyx_t_1 = __pyx_v_offset;
19427  __pyx_t_2 = __pyx_t_1;
19428  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
19429  __pyx_v_i = __pyx_t_3;
19430 
19431  /* "View.MemoryView":1354
19432  *
19433  * for i in range(offset):
19434  * mslice.shape[i] = 1 # <<<<<<<<<<<<<<
19435  * mslice.strides[i] = mslice.strides[0]
19436  * mslice.suboffsets[i] = -1
19437  */
19438  __Pyx_TraceLine(1354,1,__PYX_ERR(1, 1354, __pyx_L1_error))
19439  (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
19440 
19441  /* "View.MemoryView":1355
19442  * for i in range(offset):
19443  * mslice.shape[i] = 1
19444  * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
19445  * mslice.suboffsets[i] = -1
19446  *
19447  */
19448  __Pyx_TraceLine(1355,1,__PYX_ERR(1, 1355, __pyx_L1_error))
19449  (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
19450 
19451  /* "View.MemoryView":1356
19452  * mslice.shape[i] = 1
19453  * mslice.strides[i] = mslice.strides[0]
19454  * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
19455  *
19456  *
19457  */
19458  __Pyx_TraceLine(1356,1,__PYX_ERR(1, 1356, __pyx_L1_error))
19459  (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
19460  }
19461 
19462  /* "View.MemoryView":1342
19463  *
19464  * @cname('__pyx_memoryview_broadcast_leading')
19465  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
19466  * int ndim,
19467  * int ndim_other) nogil:
19468  */
19469 
19470  /* function exit code */
19471  goto __pyx_L0;
19472  __pyx_L1_error:;
19473  __Pyx_WriteUnraisable("View.MemoryView.broadcast_leading", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
19474  __pyx_L0:;
19475  __Pyx_TraceReturn(Py_None, 1);
19476 }
19477 
19478 /* "View.MemoryView":1364
19479  *
19480  * @cname('__pyx_memoryview_refcount_copying')
19481  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
19482  * int ndim, bint inc) nogil:
19483  *
19484  */
19485 
19486 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
19487  __Pyx_TraceDeclarations
19488  int __pyx_t_1;
19489  int __pyx_lineno = 0;
19490  const char *__pyx_filename = NULL;
19491  int __pyx_clineno = 0;
19492  __Pyx_TraceCall("refcount_copying", __pyx_f[1], 1364, 1, __PYX_ERR(1, 1364, __pyx_L1_error));
19493 
19494  /* "View.MemoryView":1368
19495  *
19496  *
19497  * if dtype_is_object: # <<<<<<<<<<<<<<
19498  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
19499  * dst.strides, ndim, inc)
19500  */
19501  __Pyx_TraceLine(1368,1,__PYX_ERR(1, 1368, __pyx_L1_error))
19502  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
19503  if (__pyx_t_1) {
19504 
19505  /* "View.MemoryView":1369
19506  *
19507  * if dtype_is_object:
19508  * refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<<
19509  * dst.strides, ndim, inc)
19510  *
19511  */
19512  __Pyx_TraceLine(1369,1,__PYX_ERR(1, 1369, __pyx_L1_error))
19513  __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
19514 
19515  /* "View.MemoryView":1368
19516  *
19517  *
19518  * if dtype_is_object: # <<<<<<<<<<<<<<
19519  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
19520  * dst.strides, ndim, inc)
19521  */
19522  }
19523 
19524  /* "View.MemoryView":1364
19525  *
19526  * @cname('__pyx_memoryview_refcount_copying')
19527  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
19528  * int ndim, bint inc) nogil:
19529  *
19530  */
19531 
19532  /* function exit code */
19533  goto __pyx_L0;
19534  __pyx_L1_error:;
19535  __Pyx_WriteUnraisable("View.MemoryView.refcount_copying", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
19536  __pyx_L0:;
19537  __Pyx_TraceReturn(Py_None, 1);
19538 }
19539 
19540 /* "View.MemoryView":1373
19541  *
19542  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
19543  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19544  * Py_ssize_t *strides, int ndim,
19545  * bint inc) with gil:
19546  */
19547 
19548 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
19549  __Pyx_TraceDeclarations
19550  __Pyx_RefNannyDeclarations
19551  int __pyx_lineno = 0;
19552  const char *__pyx_filename = NULL;
19553  int __pyx_clineno = 0;
19554  #ifdef WITH_THREAD
19555  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
19556  #endif
19557  __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
19558  __Pyx_TraceCall("refcount_objects_in_slice_with_gil", __pyx_f[1], 1373, 0, __PYX_ERR(1, 1373, __pyx_L1_error));
19559 
19560  /* "View.MemoryView":1376
19561  * Py_ssize_t *strides, int ndim,
19562  * bint inc) with gil:
19563  * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
19564  *
19565  * @cname('__pyx_memoryview_refcount_objects_in_slice')
19566  */
19567  __Pyx_TraceLine(1376,0,__PYX_ERR(1, 1376, __pyx_L1_error))
19568  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
19569 
19570  /* "View.MemoryView":1373
19571  *
19572  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
19573  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19574  * Py_ssize_t *strides, int ndim,
19575  * bint inc) with gil:
19576  */
19577 
19578  /* function exit code */
19579  goto __pyx_L0;
19580  __pyx_L1_error:;
19581  __Pyx_WriteUnraisable("View.MemoryView.refcount_objects_in_slice_with_gil", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
19582  __pyx_L0:;
19583  __Pyx_TraceReturn(Py_None, 0);
19584  __Pyx_RefNannyFinishContext();
19585  #ifdef WITH_THREAD
19586  __Pyx_PyGILState_Release(__pyx_gilstate_save);
19587  #endif
19588 }
19589 
19590 /* "View.MemoryView":1379
19591  *
19592  * @cname('__pyx_memoryview_refcount_objects_in_slice')
19593  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19594  * Py_ssize_t *strides, int ndim, bint inc):
19595  * cdef Py_ssize_t i
19596  */
19597 
19598 static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
19599  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
19600  __Pyx_TraceDeclarations
19601  __Pyx_RefNannyDeclarations
19602  Py_ssize_t __pyx_t_1;
19603  Py_ssize_t __pyx_t_2;
19604  Py_ssize_t __pyx_t_3;
19605  int __pyx_t_4;
19606  int __pyx_lineno = 0;
19607  const char *__pyx_filename = NULL;
19608  int __pyx_clineno = 0;
19609  __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
19610  __Pyx_TraceCall("refcount_objects_in_slice", __pyx_f[1], 1379, 0, __PYX_ERR(1, 1379, __pyx_L1_error));
19611 
19612  /* "View.MemoryView":1383
19613  * cdef Py_ssize_t i
19614  *
19615  * for i in range(shape[0]): # <<<<<<<<<<<<<<
19616  * if ndim == 1:
19617  * if inc:
19618  */
19619  __Pyx_TraceLine(1383,0,__PYX_ERR(1, 1383, __pyx_L1_error))
19620  __pyx_t_1 = (__pyx_v_shape[0]);
19621  __pyx_t_2 = __pyx_t_1;
19622  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
19623  __pyx_v_i = __pyx_t_3;
19624 
19625  /* "View.MemoryView":1384
19626  *
19627  * for i in range(shape[0]):
19628  * if ndim == 1: # <<<<<<<<<<<<<<
19629  * if inc:
19630  * Py_INCREF((<PyObject **> data)[0])
19631  */
19632  __Pyx_TraceLine(1384,0,__PYX_ERR(1, 1384, __pyx_L1_error))
19633  __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
19634  if (__pyx_t_4) {
19635 
19636  /* "View.MemoryView":1385
19637  * for i in range(shape[0]):
19638  * if ndim == 1:
19639  * if inc: # <<<<<<<<<<<<<<
19640  * Py_INCREF((<PyObject **> data)[0])
19641  * else:
19642  */
19643  __Pyx_TraceLine(1385,0,__PYX_ERR(1, 1385, __pyx_L1_error))
19644  __pyx_t_4 = (__pyx_v_inc != 0);
19645  if (__pyx_t_4) {
19646 
19647  /* "View.MemoryView":1386
19648  * if ndim == 1:
19649  * if inc:
19650  * Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
19651  * else:
19652  * Py_DECREF((<PyObject **> data)[0])
19653  */
19654  __Pyx_TraceLine(1386,0,__PYX_ERR(1, 1386, __pyx_L1_error))
19655  Py_INCREF((((PyObject **)__pyx_v_data)[0]));
19656 
19657  /* "View.MemoryView":1385
19658  * for i in range(shape[0]):
19659  * if ndim == 1:
19660  * if inc: # <<<<<<<<<<<<<<
19661  * Py_INCREF((<PyObject **> data)[0])
19662  * else:
19663  */
19664  goto __pyx_L6;
19665  }
19666 
19667  /* "View.MemoryView":1388
19668  * Py_INCREF((<PyObject **> data)[0])
19669  * else:
19670  * Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
19671  * else:
19672  * refcount_objects_in_slice(data, shape + 1, strides + 1,
19673  */
19674  __Pyx_TraceLine(1388,0,__PYX_ERR(1, 1388, __pyx_L1_error))
19675  /*else*/ {
19676  Py_DECREF((((PyObject **)__pyx_v_data)[0]));
19677  }
19678  __pyx_L6:;
19679 
19680  /* "View.MemoryView":1384
19681  *
19682  * for i in range(shape[0]):
19683  * if ndim == 1: # <<<<<<<<<<<<<<
19684  * if inc:
19685  * Py_INCREF((<PyObject **> data)[0])
19686  */
19687  goto __pyx_L5;
19688  }
19689 
19690  /* "View.MemoryView":1390
19691  * Py_DECREF((<PyObject **> data)[0])
19692  * else:
19693  * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
19694  * ndim - 1, inc)
19695  *
19696  */
19697  __Pyx_TraceLine(1390,0,__PYX_ERR(1, 1390, __pyx_L1_error))
19698  /*else*/ {
19699 
19700  /* "View.MemoryView":1391
19701  * else:
19702  * refcount_objects_in_slice(data, shape + 1, strides + 1,
19703  * ndim - 1, inc) # <<<<<<<<<<<<<<
19704  *
19705  * data += strides[0]
19706  */
19707  __Pyx_TraceLine(1391,0,__PYX_ERR(1, 1391, __pyx_L1_error))
19708  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
19709  }
19710  __pyx_L5:;
19711 
19712  /* "View.MemoryView":1393
19713  * ndim - 1, inc)
19714  *
19715  * data += strides[0] # <<<<<<<<<<<<<<
19716  *
19717  *
19718  */
19719  __Pyx_TraceLine(1393,0,__PYX_ERR(1, 1393, __pyx_L1_error))
19720  __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
19721  }
19722 
19723  /* "View.MemoryView":1379
19724  *
19725  * @cname('__pyx_memoryview_refcount_objects_in_slice')
19726  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19727  * Py_ssize_t *strides, int ndim, bint inc):
19728  * cdef Py_ssize_t i
19729  */
19730 
19731  /* function exit code */
19732  goto __pyx_L0;
19733  __pyx_L1_error:;
19734  __Pyx_WriteUnraisable("View.MemoryView.refcount_objects_in_slice", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
19735  __pyx_L0:;
19736  __Pyx_TraceReturn(Py_None, 0);
19737  __Pyx_RefNannyFinishContext();
19738 }
19739 
19740 /* "View.MemoryView":1399
19741  *
19742  * @cname('__pyx_memoryview_slice_assign_scalar')
19743  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
19744  * size_t itemsize, void *item,
19745  * bint dtype_is_object) nogil:
19746  */
19747 
19748 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
19749  __Pyx_TraceDeclarations
19750  int __pyx_lineno = 0;
19751  const char *__pyx_filename = NULL;
19752  int __pyx_clineno = 0;
19753  __Pyx_TraceCall("slice_assign_scalar", __pyx_f[1], 1399, 1, __PYX_ERR(1, 1399, __pyx_L1_error));
19754 
19755  /* "View.MemoryView":1402
19756  * size_t itemsize, void *item,
19757  * bint dtype_is_object) nogil:
19758  * refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
19759  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
19760  * itemsize, item)
19761  */
19762  __Pyx_TraceLine(1402,1,__PYX_ERR(1, 1402, __pyx_L1_error))
19763  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
19764 
19765  /* "View.MemoryView":1403
19766  * bint dtype_is_object) nogil:
19767  * refcount_copying(dst, dtype_is_object, ndim, False)
19768  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<<
19769  * itemsize, item)
19770  * refcount_copying(dst, dtype_is_object, ndim, True)
19771  */
19772  __Pyx_TraceLine(1403,1,__PYX_ERR(1, 1403, __pyx_L1_error))
19773  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
19774 
19775  /* "View.MemoryView":1405
19776  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
19777  * itemsize, item)
19778  * refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
19779  *
19780  *
19781  */
19782  __Pyx_TraceLine(1405,1,__PYX_ERR(1, 1405, __pyx_L1_error))
19783  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
19784 
19785  /* "View.MemoryView":1399
19786  *
19787  * @cname('__pyx_memoryview_slice_assign_scalar')
19788  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
19789  * size_t itemsize, void *item,
19790  * bint dtype_is_object) nogil:
19791  */
19792 
19793  /* function exit code */
19794  goto __pyx_L0;
19795  __pyx_L1_error:;
19796  __Pyx_WriteUnraisable("View.MemoryView.slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
19797  __pyx_L0:;
19798  __Pyx_TraceReturn(Py_None, 1);
19799 }
19800 
19801 /* "View.MemoryView":1409
19802  *
19803  * @cname('__pyx_memoryview__slice_assign_scalar')
19804  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19805  * Py_ssize_t *strides, int ndim,
19806  * size_t itemsize, void *item) nogil:
19807  */
19808 
19809 static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
19810  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
19811  Py_ssize_t __pyx_v_stride;
19812  Py_ssize_t __pyx_v_extent;
19813  __Pyx_TraceDeclarations
19814  int __pyx_t_1;
19815  Py_ssize_t __pyx_t_2;
19816  Py_ssize_t __pyx_t_3;
19817  Py_ssize_t __pyx_t_4;
19818  int __pyx_lineno = 0;
19819  const char *__pyx_filename = NULL;
19820  int __pyx_clineno = 0;
19821  __Pyx_TraceCall("_slice_assign_scalar", __pyx_f[1], 1409, 1, __PYX_ERR(1, 1409, __pyx_L1_error));
19822 
19823  /* "View.MemoryView":1413
19824  * size_t itemsize, void *item) nogil:
19825  * cdef Py_ssize_t i
19826  * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
19827  * cdef Py_ssize_t extent = shape[0]
19828  *
19829  */
19830  __Pyx_TraceLine(1413,1,__PYX_ERR(1, 1413, __pyx_L1_error))
19831  __pyx_v_stride = (__pyx_v_strides[0]);
19832 
19833  /* "View.MemoryView":1414
19834  * cdef Py_ssize_t i
19835  * cdef Py_ssize_t stride = strides[0]
19836  * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
19837  *
19838  * if ndim == 1:
19839  */
19840  __Pyx_TraceLine(1414,1,__PYX_ERR(1, 1414, __pyx_L1_error))
19841  __pyx_v_extent = (__pyx_v_shape[0]);
19842 
19843  /* "View.MemoryView":1416
19844  * cdef Py_ssize_t extent = shape[0]
19845  *
19846  * if ndim == 1: # <<<<<<<<<<<<<<
19847  * for i in range(extent):
19848  * memcpy(data, item, itemsize)
19849  */
19850  __Pyx_TraceLine(1416,1,__PYX_ERR(1, 1416, __pyx_L1_error))
19851  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
19852  if (__pyx_t_1) {
19853 
19854  /* "View.MemoryView":1417
19855  *
19856  * if ndim == 1:
19857  * for i in range(extent): # <<<<<<<<<<<<<<
19858  * memcpy(data, item, itemsize)
19859  * data += stride
19860  */
19861  __Pyx_TraceLine(1417,1,__PYX_ERR(1, 1417, __pyx_L1_error))
19862  __pyx_t_2 = __pyx_v_extent;
19863  __pyx_t_3 = __pyx_t_2;
19864  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
19865  __pyx_v_i = __pyx_t_4;
19866 
19867  /* "View.MemoryView":1418
19868  * if ndim == 1:
19869  * for i in range(extent):
19870  * memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
19871  * data += stride
19872  * else:
19873  */
19874  __Pyx_TraceLine(1418,1,__PYX_ERR(1, 1418, __pyx_L1_error))
19875  (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
19876 
19877  /* "View.MemoryView":1419
19878  * for i in range(extent):
19879  * memcpy(data, item, itemsize)
19880  * data += stride # <<<<<<<<<<<<<<
19881  * else:
19882  * for i in range(extent):
19883  */
19884  __Pyx_TraceLine(1419,1,__PYX_ERR(1, 1419, __pyx_L1_error))
19885  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
19886  }
19887 
19888  /* "View.MemoryView":1416
19889  * cdef Py_ssize_t extent = shape[0]
19890  *
19891  * if ndim == 1: # <<<<<<<<<<<<<<
19892  * for i in range(extent):
19893  * memcpy(data, item, itemsize)
19894  */
19895  goto __pyx_L3;
19896  }
19897 
19898  /* "View.MemoryView":1421
19899  * data += stride
19900  * else:
19901  * for i in range(extent): # <<<<<<<<<<<<<<
19902  * _slice_assign_scalar(data, shape + 1, strides + 1,
19903  * ndim - 1, itemsize, item)
19904  */
19905  __Pyx_TraceLine(1421,1,__PYX_ERR(1, 1421, __pyx_L1_error))
19906  /*else*/ {
19907  __pyx_t_2 = __pyx_v_extent;
19908  __pyx_t_3 = __pyx_t_2;
19909  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
19910  __pyx_v_i = __pyx_t_4;
19911 
19912  /* "View.MemoryView":1422
19913  * else:
19914  * for i in range(extent):
19915  * _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
19916  * ndim - 1, itemsize, item)
19917  * data += stride
19918  */
19919  __Pyx_TraceLine(1422,1,__PYX_ERR(1, 1422, __pyx_L1_error))
19920  __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
19921 
19922  /* "View.MemoryView":1424
19923  * _slice_assign_scalar(data, shape + 1, strides + 1,
19924  * ndim - 1, itemsize, item)
19925  * data += stride # <<<<<<<<<<<<<<
19926  *
19927  *
19928  */
19929  __Pyx_TraceLine(1424,1,__PYX_ERR(1, 1424, __pyx_L1_error))
19930  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
19931  }
19932  }
19933  __pyx_L3:;
19934 
19935  /* "View.MemoryView":1409
19936  *
19937  * @cname('__pyx_memoryview__slice_assign_scalar')
19938  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19939  * Py_ssize_t *strides, int ndim,
19940  * size_t itemsize, void *item) nogil:
19941  */
19942 
19943  /* function exit code */
19944  goto __pyx_L0;
19945  __pyx_L1_error:;
19946  __Pyx_WriteUnraisable("View.MemoryView._slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
19947  __pyx_L0:;
19948  __Pyx_TraceReturn(Py_None, 1);
19949 }
19950 
19951 /* "(tree fragment)":1
19952  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
19953  * cdef object __pyx_PickleError
19954  * cdef object __pyx_result
19955  */
19956 
19957 /* Python wrapper */
19958 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19959 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
19960 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19961  PyObject *__pyx_v___pyx_type = 0;
19962  long __pyx_v___pyx_checksum;
19963  PyObject *__pyx_v___pyx_state = 0;
19964  int __pyx_lineno = 0;
19965  const char *__pyx_filename = NULL;
19966  int __pyx_clineno = 0;
19967  PyObject *__pyx_r = 0;
19968  __Pyx_RefNannyDeclarations
19969  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
19970  {
19971  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
19972  PyObject* values[3] = {0,0,0};
19973  if (unlikely(__pyx_kwds)) {
19974  Py_ssize_t kw_args;
19975  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19976  switch (pos_args) {
19977  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19978  CYTHON_FALLTHROUGH;
19979  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19980  CYTHON_FALLTHROUGH;
19981  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19982  CYTHON_FALLTHROUGH;
19983  case 0: break;
19984  default: goto __pyx_L5_argtuple_error;
19985  }
19986  kw_args = PyDict_Size(__pyx_kwds);
19987  switch (pos_args) {
19988  case 0:
19989  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
19990  else goto __pyx_L5_argtuple_error;
19991  CYTHON_FALLTHROUGH;
19992  case 1:
19993  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
19994  else {
19995  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
19996  }
19997  CYTHON_FALLTHROUGH;
19998  case 2:
19999  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
20000  else {
20001  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
20002  }
20003  }
20004  if (unlikely(kw_args > 0)) {
20005  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
20006  }
20007  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
20008  goto __pyx_L5_argtuple_error;
20009  } else {
20010  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20011  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20012  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20013  }
20014  __pyx_v___pyx_type = values[0];
20015  __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
20016  __pyx_v___pyx_state = values[2];
20017  }
20018  goto __pyx_L4_argument_unpacking_done;
20019  __pyx_L5_argtuple_error:;
20020  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
20021  __pyx_L3_error:;
20022  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
20023  __Pyx_RefNannyFinishContext();
20024  return NULL;
20025  __pyx_L4_argument_unpacking_done:;
20026  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
20027 
20028  /* function exit code */
20029  __Pyx_RefNannyFinishContext();
20030  return __pyx_r;
20031 }
20032 
20033 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
20034  PyObject *__pyx_v___pyx_PickleError = 0;
20035  PyObject *__pyx_v___pyx_result = 0;
20036  PyObject *__pyx_r = NULL;
20037  __Pyx_TraceDeclarations
20038  __Pyx_RefNannyDeclarations
20039  PyObject *__pyx_t_1 = NULL;
20040  int __pyx_t_2;
20041  int __pyx_t_3;
20042  PyObject *__pyx_t_4 = NULL;
20043  PyObject *__pyx_t_5 = NULL;
20044  PyObject *__pyx_t_6 = NULL;
20045  int __pyx_lineno = 0;
20046  const char *__pyx_filename = NULL;
20047  int __pyx_clineno = 0;
20048  __Pyx_TraceFrameInit(__pyx_codeobj__36)
20049  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
20050  __Pyx_TraceCall("__pyx_unpickle_Enum", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
20051 
20052  /* "(tree fragment)":4
20053  * cdef object __pyx_PickleError
20054  * cdef object __pyx_result
20055  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995): # <<<<<<<<<<<<<<
20056  * from pickle import PickleError as __pyx_PickleError
20057  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20058  */
20059  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
20060  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
20061  __Pyx_GOTREF(__pyx_t_1);
20062  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__37, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
20063  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20064  __pyx_t_3 = (__pyx_t_2 != 0);
20065  if (__pyx_t_3) {
20066 
20067  /* "(tree fragment)":5
20068  * cdef object __pyx_result
20069  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
20070  * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
20071  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20072  * __pyx_result = Enum.__new__(__pyx_type)
20073  */
20074  __Pyx_TraceLine(5,0,__PYX_ERR(1, 5, __pyx_L1_error))
20075  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
20076  __Pyx_GOTREF(__pyx_t_1);
20077  __Pyx_INCREF(__pyx_n_s_PickleError);
20078  __Pyx_GIVEREF(__pyx_n_s_PickleError);
20079  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
20080  __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
20081  __Pyx_GOTREF(__pyx_t_4);
20082  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20083  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
20084  __Pyx_GOTREF(__pyx_t_1);
20085  __Pyx_INCREF(__pyx_t_1);
20086  __pyx_v___pyx_PickleError = __pyx_t_1;
20087  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20088  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20089 
20090  /* "(tree fragment)":6
20091  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
20092  * from pickle import PickleError as __pyx_PickleError
20093  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum) # <<<<<<<<<<<<<<
20094  * __pyx_result = Enum.__new__(__pyx_type)
20095  * if __pyx_state is not None:
20096  */
20097  __Pyx_TraceLine(6,0,__PYX_ERR(1, 6, __pyx_L1_error))
20098  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
20099  __Pyx_GOTREF(__pyx_t_1);
20100  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
20101  __Pyx_GOTREF(__pyx_t_5);
20102  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20103  __Pyx_INCREF(__pyx_v___pyx_PickleError);
20104  __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
20105  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
20106  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
20107  if (likely(__pyx_t_6)) {
20108  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
20109  __Pyx_INCREF(__pyx_t_6);
20110  __Pyx_INCREF(function);
20111  __Pyx_DECREF_SET(__pyx_t_1, function);
20112  }
20113  }
20114  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
20115  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20116  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20117  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
20118  __Pyx_GOTREF(__pyx_t_4);
20119  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20120  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
20121  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20122  __PYX_ERR(1, 6, __pyx_L1_error)
20123 
20124  /* "(tree fragment)":4
20125  * cdef object __pyx_PickleError
20126  * cdef object __pyx_result
20127  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995): # <<<<<<<<<<<<<<
20128  * from pickle import PickleError as __pyx_PickleError
20129  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20130  */
20131  }
20132 
20133  /* "(tree fragment)":7
20134  * from pickle import PickleError as __pyx_PickleError
20135  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20136  * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<<
20137  * if __pyx_state is not None:
20138  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20139  */
20140  __Pyx_TraceLine(7,0,__PYX_ERR(1, 7, __pyx_L1_error))
20141  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
20142  __Pyx_GOTREF(__pyx_t_1);
20143  __pyx_t_5 = NULL;
20144  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
20145  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
20146  if (likely(__pyx_t_5)) {
20147  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
20148  __Pyx_INCREF(__pyx_t_5);
20149  __Pyx_INCREF(function);
20150  __Pyx_DECREF_SET(__pyx_t_1, function);
20151  }
20152  }
20153  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
20154  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20155  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
20156  __Pyx_GOTREF(__pyx_t_4);
20157  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20158  __pyx_v___pyx_result = __pyx_t_4;
20159  __pyx_t_4 = 0;
20160 
20161  /* "(tree fragment)":8
20162  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20163  * __pyx_result = Enum.__new__(__pyx_type)
20164  * if __pyx_state is not None: # <<<<<<<<<<<<<<
20165  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20166  * return __pyx_result
20167  */
20168  __Pyx_TraceLine(8,0,__PYX_ERR(1, 8, __pyx_L1_error))
20169  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
20170  __pyx_t_2 = (__pyx_t_3 != 0);
20171  if (__pyx_t_2) {
20172 
20173  /* "(tree fragment)":9
20174  * __pyx_result = Enum.__new__(__pyx_type)
20175  * if __pyx_state is not None:
20176  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
20177  * return __pyx_result
20178  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
20179  */
20180  __Pyx_TraceLine(9,0,__PYX_ERR(1, 9, __pyx_L1_error))
20181  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
20182  __pyx_t_4 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
20183  __Pyx_GOTREF(__pyx_t_4);
20184  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20185 
20186  /* "(tree fragment)":8
20187  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20188  * __pyx_result = Enum.__new__(__pyx_type)
20189  * if __pyx_state is not None: # <<<<<<<<<<<<<<
20190  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20191  * return __pyx_result
20192  */
20193  }
20194 
20195  /* "(tree fragment)":10
20196  * if __pyx_state is not None:
20197  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20198  * return __pyx_result # <<<<<<<<<<<<<<
20199  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
20200  * __pyx_result.name = __pyx_state[0]
20201  */
20202  __Pyx_TraceLine(10,0,__PYX_ERR(1, 10, __pyx_L1_error))
20203  __Pyx_XDECREF(__pyx_r);
20204  __Pyx_INCREF(__pyx_v___pyx_result);
20205  __pyx_r = __pyx_v___pyx_result;
20206  goto __pyx_L0;
20207 
20208  /* "(tree fragment)":1
20209  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
20210  * cdef object __pyx_PickleError
20211  * cdef object __pyx_result
20212  */
20213 
20214  /* function exit code */
20215  __pyx_L1_error:;
20216  __Pyx_XDECREF(__pyx_t_1);
20217  __Pyx_XDECREF(__pyx_t_4);
20218  __Pyx_XDECREF(__pyx_t_5);
20219  __Pyx_XDECREF(__pyx_t_6);
20220  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
20221  __pyx_r = NULL;
20222  __pyx_L0:;
20223  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
20224  __Pyx_XDECREF(__pyx_v___pyx_result);
20225  __Pyx_XGIVEREF(__pyx_r);
20226  __Pyx_TraceReturn(__pyx_r, 0);
20227  __Pyx_RefNannyFinishContext();
20228  return __pyx_r;
20229 }
20230 
20231 /* "(tree fragment)":11
20232  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20233  * return __pyx_result
20234  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
20235  * __pyx_result.name = __pyx_state[0]
20236  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
20237  */
20238 
20239 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
20240  PyObject *__pyx_r = NULL;
20241  __Pyx_TraceDeclarations
20242  __Pyx_RefNannyDeclarations
20243  PyObject *__pyx_t_1 = NULL;
20244  int __pyx_t_2;
20245  Py_ssize_t __pyx_t_3;
20246  int __pyx_t_4;
20247  int __pyx_t_5;
20248  PyObject *__pyx_t_6 = NULL;
20249  PyObject *__pyx_t_7 = NULL;
20250  PyObject *__pyx_t_8 = NULL;
20251  int __pyx_lineno = 0;
20252  const char *__pyx_filename = NULL;
20253  int __pyx_clineno = 0;
20254  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
20255  __Pyx_TraceCall("__pyx_unpickle_Enum__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
20256 
20257  /* "(tree fragment)":12
20258  * return __pyx_result
20259  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
20260  * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<<
20261  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
20262  * __pyx_result.__dict__.update(__pyx_state[1])
20263  */
20264  __Pyx_TraceLine(12,0,__PYX_ERR(1, 12, __pyx_L1_error))
20265  if (unlikely(__pyx_v___pyx_state == Py_None)) {
20266  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
20267  __PYX_ERR(1, 12, __pyx_L1_error)
20268  }
20269  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
20270  __Pyx_GOTREF(__pyx_t_1);
20271  __Pyx_GIVEREF(__pyx_t_1);
20272  __Pyx_GOTREF(__pyx_v___pyx_result->name);
20273  __Pyx_DECREF(__pyx_v___pyx_result->name);
20274  __pyx_v___pyx_result->name = __pyx_t_1;
20275  __pyx_t_1 = 0;
20276 
20277  /* "(tree fragment)":13
20278  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
20279  * __pyx_result.name = __pyx_state[0]
20280  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
20281  * __pyx_result.__dict__.update(__pyx_state[1])
20282  */
20283  __Pyx_TraceLine(13,0,__PYX_ERR(1, 13, __pyx_L1_error))
20284  if (unlikely(__pyx_v___pyx_state == Py_None)) {
20285  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
20286  __PYX_ERR(1, 13, __pyx_L1_error)
20287  }
20288  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
20289  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
20290  if (__pyx_t_4) {
20291  } else {
20292  __pyx_t_2 = __pyx_t_4;
20293  goto __pyx_L4_bool_binop_done;
20294  }
20295  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
20296  __pyx_t_5 = (__pyx_t_4 != 0);
20297  __pyx_t_2 = __pyx_t_5;
20298  __pyx_L4_bool_binop_done:;
20299  if (__pyx_t_2) {
20300 
20301  /* "(tree fragment)":14
20302  * __pyx_result.name = __pyx_state[0]
20303  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
20304  * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
20305  */
20306  __Pyx_TraceLine(14,0,__PYX_ERR(1, 14, __pyx_L1_error))
20307  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
20308  __Pyx_GOTREF(__pyx_t_6);
20309  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
20310  __Pyx_GOTREF(__pyx_t_7);
20311  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20312  if (unlikely(__pyx_v___pyx_state == Py_None)) {
20313  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
20314  __PYX_ERR(1, 14, __pyx_L1_error)
20315  }
20316  __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
20317  __Pyx_GOTREF(__pyx_t_6);
20318  __pyx_t_8 = NULL;
20319  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
20320  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
20321  if (likely(__pyx_t_8)) {
20322  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
20323  __Pyx_INCREF(__pyx_t_8);
20324  __Pyx_INCREF(function);
20325  __Pyx_DECREF_SET(__pyx_t_7, function);
20326  }
20327  }
20328  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
20329  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
20330  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20331  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
20332  __Pyx_GOTREF(__pyx_t_1);
20333  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20334  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20335 
20336  /* "(tree fragment)":13
20337  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
20338  * __pyx_result.name = __pyx_state[0]
20339  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
20340  * __pyx_result.__dict__.update(__pyx_state[1])
20341  */
20342  }
20343 
20344  /* "(tree fragment)":11
20345  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20346  * return __pyx_result
20347  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
20348  * __pyx_result.name = __pyx_state[0]
20349  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
20350  */
20351 
20352  /* function exit code */
20353  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20354  goto __pyx_L0;
20355  __pyx_L1_error:;
20356  __Pyx_XDECREF(__pyx_t_1);
20357  __Pyx_XDECREF(__pyx_t_6);
20358  __Pyx_XDECREF(__pyx_t_7);
20359  __Pyx_XDECREF(__pyx_t_8);
20360  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
20361  __pyx_r = 0;
20362  __pyx_L0:;
20363  __Pyx_XGIVEREF(__pyx_r);
20364  __Pyx_TraceReturn(__pyx_r, 0);
20365  __Pyx_RefNannyFinishContext();
20366  return __pyx_r;
20367 }
20368 static struct __pyx_vtabstruct_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
20369 
20370 static PyObject *__pyx_tp_new_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
20371  struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *p;
20372  PyObject *o;
20373  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
20374  o = (*t->tp_alloc)(t, 0);
20375  } else {
20376  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
20377  }
20378  if (unlikely(!o)) return 0;
20379  p = ((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)o);
20380  p->__pyx_vtab = __pyx_vtabptr_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
20381  p->parameters = Py_None; Py_INCREF(Py_None);
20382  if (unlikely(__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
20383  return o;
20384  bad:
20385  Py_DECREF(o); o = 0;
20386  return NULL;
20387 }
20388 
20389 static void __pyx_tp_dealloc_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator(PyObject *o) {
20390  struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *p = (struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)o;
20391  #if CYTHON_USE_TP_FINALIZE
20392  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
20393  if (PyObject_CallFinalizerFromDealloc(o)) return;
20394  }
20395  #endif
20396  PyObject_GC_UnTrack(o);
20397  {
20398  PyObject *etype, *eval, *etb;
20399  PyErr_Fetch(&etype, &eval, &etb);
20400  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
20401  __pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_3__dealloc__(o);
20402  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
20403  PyErr_Restore(etype, eval, etb);
20404  }
20405  Py_CLEAR(p->parameters);
20406  (*Py_TYPE(o)->tp_free)(o);
20407 }
20408 
20409 static int __pyx_tp_traverse_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator(PyObject *o, visitproc v, void *a) {
20410  int e;
20411  struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *p = (struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)o;
20412  if (p->parameters) {
20413  e = (*v)(p->parameters, a); if (e) return e;
20414  }
20415  return 0;
20416 }
20417 
20418 static int __pyx_tp_clear_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator(PyObject *o) {
20419  PyObject* tmp;
20420  struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *p = (struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)o;
20421  tmp = ((PyObject*)p->parameters);
20422  p->parameters = Py_None; Py_INCREF(Py_None);
20423  Py_XDECREF(tmp);
20424  return 0;
20425 }
20426 
20427 static PyMethodDef __pyx_methods_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator[] = {
20428  {"get_num_parameters", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters},
20429  {"get_data_type_name", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name},
20430  {"set_parameters", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters, METH_O, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters},
20431  {"__reduce_cython__", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__},
20432  {"__setstate_cython__", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__, METH_O, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__},
20433  {0, 0, 0, 0}
20434 };
20435 
20436 static PyTypeObject __pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator = {
20437  PyVarObject_HEAD_INIT(0, 0)
20438  "imate._c_linear_operator.py_c_linear_operator.pycLinearOperator", /*tp_name*/
20439  sizeof(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator), /*tp_basicsize*/
20440  0, /*tp_itemsize*/
20441  __pyx_tp_dealloc_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator, /*tp_dealloc*/
20442  #if PY_VERSION_HEX < 0x030800b4
20443  0, /*tp_print*/
20444  #endif
20445  #if PY_VERSION_HEX >= 0x030800b4
20446  0, /*tp_vectorcall_offset*/
20447  #endif
20448  0, /*tp_getattr*/
20449  0, /*tp_setattr*/
20450  #if PY_MAJOR_VERSION < 3
20451  0, /*tp_compare*/
20452  #endif
20453  #if PY_MAJOR_VERSION >= 3
20454  0, /*tp_as_async*/
20455  #endif
20456  0, /*tp_repr*/
20457  0, /*tp_as_number*/
20458  0, /*tp_as_sequence*/
20459  0, /*tp_as_mapping*/
20460  0, /*tp_hash*/
20461  0, /*tp_call*/
20462  0, /*tp_str*/
20463  0, /*tp_getattro*/
20464  0, /*tp_setattro*/
20465  0, /*tp_as_buffer*/
20466  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
20467  "\n ", /*tp_doc*/
20468  __pyx_tp_traverse_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator, /*tp_traverse*/
20469  __pyx_tp_clear_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator, /*tp_clear*/
20470  0, /*tp_richcompare*/
20471  0, /*tp_weaklistoffset*/
20472  0, /*tp_iter*/
20473  0, /*tp_iternext*/
20474  __pyx_methods_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator, /*tp_methods*/
20475  0, /*tp_members*/
20476  0, /*tp_getset*/
20477  0, /*tp_base*/
20478  0, /*tp_dict*/
20479  0, /*tp_descr_get*/
20480  0, /*tp_descr_set*/
20481  0, /*tp_dictoffset*/
20482  0, /*tp_init*/
20483  0, /*tp_alloc*/
20484  __pyx_tp_new_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator, /*tp_new*/
20485  0, /*tp_free*/
20486  0, /*tp_is_gc*/
20487  0, /*tp_bases*/
20488  0, /*tp_mro*/
20489  0, /*tp_cache*/
20490  0, /*tp_subclasses*/
20491  0, /*tp_weaklist*/
20492  0, /*tp_del*/
20493  0, /*tp_version_tag*/
20494  #if PY_VERSION_HEX >= 0x030400a1
20495  0, /*tp_finalize*/
20496  #endif
20497  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
20498  0, /*tp_vectorcall*/
20499  #endif
20500  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
20501  0, /*tp_print*/
20502  #endif
20503  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
20504  0, /*tp_pypy_flags*/
20505  #endif
20506 };
20507 static struct __pyx_vtabstruct_array __pyx_vtable_array;
20508 
20509 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
20510  struct __pyx_array_obj *p;
20511  PyObject *o;
20512  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
20513  o = (*t->tp_alloc)(t, 0);
20514  } else {
20515  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
20516  }
20517  if (unlikely(!o)) return 0;
20518  p = ((struct __pyx_array_obj *)o);
20519  p->__pyx_vtab = __pyx_vtabptr_array;
20520  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
20521  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
20522  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
20523  return o;
20524  bad:
20525  Py_DECREF(o); o = 0;
20526  return NULL;
20527 }
20528 
20529 static void __pyx_tp_dealloc_array(PyObject *o) {
20530  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
20531  #if CYTHON_USE_TP_FINALIZE
20532  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
20533  if (PyObject_CallFinalizerFromDealloc(o)) return;
20534  }
20535  #endif
20536  {
20537  PyObject *etype, *eval, *etb;
20538  PyErr_Fetch(&etype, &eval, &etb);
20539  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
20540  __pyx_array___dealloc__(o);
20541  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
20542  PyErr_Restore(etype, eval, etb);
20543  }
20544  Py_CLEAR(p->mode);
20545  Py_CLEAR(p->_format);
20546  (*Py_TYPE(o)->tp_free)(o);
20547 }
20548 static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
20549  PyObject *r;
20550  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
20551  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
20552  Py_DECREF(x);
20553  return r;
20554 }
20555 
20556 static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
20557  if (v) {
20558  return __pyx_array___setitem__(o, i, v);
20559  }
20560  else {
20561  PyErr_Format(PyExc_NotImplementedError,
20562  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
20563  return -1;
20564  }
20565 }
20566 
20567 static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
20568  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
20569  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
20570  PyErr_Clear();
20571  v = __pyx_array___getattr__(o, n);
20572  }
20573  return v;
20574 }
20575 
20576 static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
20577  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
20578 }
20579 
20580 static PyMethodDef __pyx_methods_array[] = {
20581  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
20582  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
20583  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
20584  {0, 0, 0, 0}
20585 };
20586 
20587 static struct PyGetSetDef __pyx_getsets_array[] = {
20588  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
20589  {0, 0, 0, 0, 0}
20590 };
20591 
20592 static PySequenceMethods __pyx_tp_as_sequence_array = {
20593  __pyx_array___len__, /*sq_length*/
20594  0, /*sq_concat*/
20595  0, /*sq_repeat*/
20596  __pyx_sq_item_array, /*sq_item*/
20597  0, /*sq_slice*/
20598  0, /*sq_ass_item*/
20599  0, /*sq_ass_slice*/
20600  0, /*sq_contains*/
20601  0, /*sq_inplace_concat*/
20602  0, /*sq_inplace_repeat*/
20603 };
20604 
20605 static PyMappingMethods __pyx_tp_as_mapping_array = {
20606  __pyx_array___len__, /*mp_length*/
20607  __pyx_array___getitem__, /*mp_subscript*/
20608  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
20609 };
20610 
20611 static PyBufferProcs __pyx_tp_as_buffer_array = {
20612  #if PY_MAJOR_VERSION < 3
20613  0, /*bf_getreadbuffer*/
20614  #endif
20615  #if PY_MAJOR_VERSION < 3
20616  0, /*bf_getwritebuffer*/
20617  #endif
20618  #if PY_MAJOR_VERSION < 3
20619  0, /*bf_getsegcount*/
20620  #endif
20621  #if PY_MAJOR_VERSION < 3
20622  0, /*bf_getcharbuffer*/
20623  #endif
20624  __pyx_array_getbuffer, /*bf_getbuffer*/
20625  0, /*bf_releasebuffer*/
20626 };
20627 
20628 static PyTypeObject __pyx_type___pyx_array = {
20629  PyVarObject_HEAD_INIT(0, 0)
20630  "imate._c_linear_operator.py_c_linear_operator.array", /*tp_name*/
20631  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
20632  0, /*tp_itemsize*/
20633  __pyx_tp_dealloc_array, /*tp_dealloc*/
20634  #if PY_VERSION_HEX < 0x030800b4
20635  0, /*tp_print*/
20636  #endif
20637  #if PY_VERSION_HEX >= 0x030800b4
20638  0, /*tp_vectorcall_offset*/
20639  #endif
20640  0, /*tp_getattr*/
20641  0, /*tp_setattr*/
20642  #if PY_MAJOR_VERSION < 3
20643  0, /*tp_compare*/
20644  #endif
20645  #if PY_MAJOR_VERSION >= 3
20646  0, /*tp_as_async*/
20647  #endif
20648  0, /*tp_repr*/
20649  0, /*tp_as_number*/
20650  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
20651  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
20652  0, /*tp_hash*/
20653  0, /*tp_call*/
20654  0, /*tp_str*/
20655  __pyx_tp_getattro_array, /*tp_getattro*/
20656  0, /*tp_setattro*/
20657  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
20658  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
20659  0, /*tp_doc*/
20660  0, /*tp_traverse*/
20661  0, /*tp_clear*/
20662  0, /*tp_richcompare*/
20663  0, /*tp_weaklistoffset*/
20664  0, /*tp_iter*/
20665  0, /*tp_iternext*/
20666  __pyx_methods_array, /*tp_methods*/
20667  0, /*tp_members*/
20668  __pyx_getsets_array, /*tp_getset*/
20669  0, /*tp_base*/
20670  0, /*tp_dict*/
20671  0, /*tp_descr_get*/
20672  0, /*tp_descr_set*/
20673  0, /*tp_dictoffset*/
20674  0, /*tp_init*/
20675  0, /*tp_alloc*/
20676  __pyx_tp_new_array, /*tp_new*/
20677  0, /*tp_free*/
20678  0, /*tp_is_gc*/
20679  0, /*tp_bases*/
20680  0, /*tp_mro*/
20681  0, /*tp_cache*/
20682  0, /*tp_subclasses*/
20683  0, /*tp_weaklist*/
20684  0, /*tp_del*/
20685  0, /*tp_version_tag*/
20686  #if PY_VERSION_HEX >= 0x030400a1
20687  0, /*tp_finalize*/
20688  #endif
20689  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
20690  0, /*tp_vectorcall*/
20691  #endif
20692  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
20693  0, /*tp_print*/
20694  #endif
20695  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
20696  0, /*tp_pypy_flags*/
20697  #endif
20698 };
20699 
20700 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
20701  struct __pyx_MemviewEnum_obj *p;
20702  PyObject *o;
20703  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
20704  o = (*t->tp_alloc)(t, 0);
20705  } else {
20706  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
20707  }
20708  if (unlikely(!o)) return 0;
20709  p = ((struct __pyx_MemviewEnum_obj *)o);
20710  p->name = Py_None; Py_INCREF(Py_None);
20711  return o;
20712 }
20713 
20714 static void __pyx_tp_dealloc_Enum(PyObject *o) {
20715  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
20716  #if CYTHON_USE_TP_FINALIZE
20717  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
20718  if (PyObject_CallFinalizerFromDealloc(o)) return;
20719  }
20720  #endif
20721  PyObject_GC_UnTrack(o);
20722  Py_CLEAR(p->name);
20723  (*Py_TYPE(o)->tp_free)(o);
20724 }
20725 
20726 static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
20727  int e;
20728  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
20729  if (p->name) {
20730  e = (*v)(p->name, a); if (e) return e;
20731  }
20732  return 0;
20733 }
20734 
20735 static int __pyx_tp_clear_Enum(PyObject *o) {
20736  PyObject* tmp;
20737  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
20738  tmp = ((PyObject*)p->name);
20739  p->name = Py_None; Py_INCREF(Py_None);
20740  Py_XDECREF(tmp);
20741  return 0;
20742 }
20743 
20744 static PyMethodDef __pyx_methods_Enum[] = {
20745  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
20746  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
20747  {0, 0, 0, 0}
20748 };
20749 
20750 static PyTypeObject __pyx_type___pyx_MemviewEnum = {
20751  PyVarObject_HEAD_INIT(0, 0)
20752  "imate._c_linear_operator.py_c_linear_operator.Enum", /*tp_name*/
20753  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
20754  0, /*tp_itemsize*/
20755  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
20756  #if PY_VERSION_HEX < 0x030800b4
20757  0, /*tp_print*/
20758  #endif
20759  #if PY_VERSION_HEX >= 0x030800b4
20760  0, /*tp_vectorcall_offset*/
20761  #endif
20762  0, /*tp_getattr*/
20763  0, /*tp_setattr*/
20764  #if PY_MAJOR_VERSION < 3
20765  0, /*tp_compare*/
20766  #endif
20767  #if PY_MAJOR_VERSION >= 3
20768  0, /*tp_as_async*/
20769  #endif
20770  __pyx_MemviewEnum___repr__, /*tp_repr*/
20771  0, /*tp_as_number*/
20772  0, /*tp_as_sequence*/
20773  0, /*tp_as_mapping*/
20774  0, /*tp_hash*/
20775  0, /*tp_call*/
20776  0, /*tp_str*/
20777  0, /*tp_getattro*/
20778  0, /*tp_setattro*/
20779  0, /*tp_as_buffer*/
20780  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
20781  0, /*tp_doc*/
20782  __pyx_tp_traverse_Enum, /*tp_traverse*/
20783  __pyx_tp_clear_Enum, /*tp_clear*/
20784  0, /*tp_richcompare*/
20785  0, /*tp_weaklistoffset*/
20786  0, /*tp_iter*/
20787  0, /*tp_iternext*/
20788  __pyx_methods_Enum, /*tp_methods*/
20789  0, /*tp_members*/
20790  0, /*tp_getset*/
20791  0, /*tp_base*/
20792  0, /*tp_dict*/
20793  0, /*tp_descr_get*/
20794  0, /*tp_descr_set*/
20795  0, /*tp_dictoffset*/
20796  __pyx_MemviewEnum___init__, /*tp_init*/
20797  0, /*tp_alloc*/
20798  __pyx_tp_new_Enum, /*tp_new*/
20799  0, /*tp_free*/
20800  0, /*tp_is_gc*/
20801  0, /*tp_bases*/
20802  0, /*tp_mro*/
20803  0, /*tp_cache*/
20804  0, /*tp_subclasses*/
20805  0, /*tp_weaklist*/
20806  0, /*tp_del*/
20807  0, /*tp_version_tag*/
20808  #if PY_VERSION_HEX >= 0x030400a1
20809  0, /*tp_finalize*/
20810  #endif
20811  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
20812  0, /*tp_vectorcall*/
20813  #endif
20814  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
20815  0, /*tp_print*/
20816  #endif
20817  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
20818  0, /*tp_pypy_flags*/
20819  #endif
20820 };
20821 static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
20822 
20823 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
20824  struct __pyx_memoryview_obj *p;
20825  PyObject *o;
20826  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
20827  o = (*t->tp_alloc)(t, 0);
20828  } else {
20829  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
20830  }
20831  if (unlikely(!o)) return 0;
20832  p = ((struct __pyx_memoryview_obj *)o);
20833  p->__pyx_vtab = __pyx_vtabptr_memoryview;
20834  p->obj = Py_None; Py_INCREF(Py_None);
20835  p->_size = Py_None; Py_INCREF(Py_None);
20836  p->_array_interface = Py_None; Py_INCREF(Py_None);
20837  p->view.obj = NULL;
20838  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
20839  return o;
20840  bad:
20841  Py_DECREF(o); o = 0;
20842  return NULL;
20843 }
20844 
20845 static void __pyx_tp_dealloc_memoryview(PyObject *o) {
20846  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
20847  #if CYTHON_USE_TP_FINALIZE
20848  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
20849  if (PyObject_CallFinalizerFromDealloc(o)) return;
20850  }
20851  #endif
20852  PyObject_GC_UnTrack(o);
20853  {
20854  PyObject *etype, *eval, *etb;
20855  PyErr_Fetch(&etype, &eval, &etb);
20856  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
20857  __pyx_memoryview___dealloc__(o);
20858  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
20859  PyErr_Restore(etype, eval, etb);
20860  }
20861  Py_CLEAR(p->obj);
20862  Py_CLEAR(p->_size);
20863  Py_CLEAR(p->_array_interface);
20864  (*Py_TYPE(o)->tp_free)(o);
20865 }
20866 
20867 static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
20868  int e;
20869  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
20870  if (p->obj) {
20871  e = (*v)(p->obj, a); if (e) return e;
20872  }
20873  if (p->_size) {
20874  e = (*v)(p->_size, a); if (e) return e;
20875  }
20876  if (p->_array_interface) {
20877  e = (*v)(p->_array_interface, a); if (e) return e;
20878  }
20879  if (p->view.obj) {
20880  e = (*v)(p->view.obj, a); if (e) return e;
20881  }
20882  return 0;
20883 }
20884 
20885 static int __pyx_tp_clear_memoryview(PyObject *o) {
20886  PyObject* tmp;
20887  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
20888  tmp = ((PyObject*)p->obj);
20889  p->obj = Py_None; Py_INCREF(Py_None);
20890  Py_XDECREF(tmp);
20891  tmp = ((PyObject*)p->_size);
20892  p->_size = Py_None; Py_INCREF(Py_None);
20893  Py_XDECREF(tmp);
20894  tmp = ((PyObject*)p->_array_interface);
20895  p->_array_interface = Py_None; Py_INCREF(Py_None);
20896  Py_XDECREF(tmp);
20897  Py_CLEAR(p->view.obj);
20898  return 0;
20899 }
20900 static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
20901  PyObject *r;
20902  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
20903  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
20904  Py_DECREF(x);
20905  return r;
20906 }
20907 
20908 static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
20909  if (v) {
20910  return __pyx_memoryview___setitem__(o, i, v);
20911  }
20912  else {
20913  PyErr_Format(PyExc_NotImplementedError,
20914  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
20915  return -1;
20916  }
20917 }
20918 
20919 static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
20920  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
20921 }
20922 
20923 static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
20924  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
20925 }
20926 
20927 static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
20928  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
20929 }
20930 
20931 static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
20932  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
20933 }
20934 
20935 static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
20936  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
20937 }
20938 
20939 static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
20940  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
20941 }
20942 
20943 static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
20944  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
20945 }
20946 
20947 static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
20948  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
20949 }
20950 
20951 static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
20952  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
20953 }
20954 
20955 static PyMethodDef __pyx_methods_memoryview[] = {
20956  {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
20957  {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
20958  {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
20959  {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
20960  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
20961  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
20962  {0, 0, 0, 0}
20963 };
20964 
20965 static struct PyGetSetDef __pyx_getsets_memoryview[] = {
20966  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
20967  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
20968  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
20969  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
20970  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
20971  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
20972  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
20973  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
20974  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
20975  {0, 0, 0, 0, 0}
20976 };
20977 
20978 static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
20979  __pyx_memoryview___len__, /*sq_length*/
20980  0, /*sq_concat*/
20981  0, /*sq_repeat*/
20982  __pyx_sq_item_memoryview, /*sq_item*/
20983  0, /*sq_slice*/
20984  0, /*sq_ass_item*/
20985  0, /*sq_ass_slice*/
20986  0, /*sq_contains*/
20987  0, /*sq_inplace_concat*/
20988  0, /*sq_inplace_repeat*/
20989 };
20990 
20991 static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
20992  __pyx_memoryview___len__, /*mp_length*/
20993  __pyx_memoryview___getitem__, /*mp_subscript*/
20994  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
20995 };
20996 
20997 static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
20998  #if PY_MAJOR_VERSION < 3
20999  0, /*bf_getreadbuffer*/
21000  #endif
21001  #if PY_MAJOR_VERSION < 3
21002  0, /*bf_getwritebuffer*/
21003  #endif
21004  #if PY_MAJOR_VERSION < 3
21005  0, /*bf_getsegcount*/
21006  #endif
21007  #if PY_MAJOR_VERSION < 3
21008  0, /*bf_getcharbuffer*/
21009  #endif
21010  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
21011  0, /*bf_releasebuffer*/
21012 };
21013 
21014 static PyTypeObject __pyx_type___pyx_memoryview = {
21015  PyVarObject_HEAD_INIT(0, 0)
21016  "imate._c_linear_operator.py_c_linear_operator.memoryview", /*tp_name*/
21017  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
21018  0, /*tp_itemsize*/
21019  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
21020  #if PY_VERSION_HEX < 0x030800b4
21021  0, /*tp_print*/
21022  #endif
21023  #if PY_VERSION_HEX >= 0x030800b4
21024  0, /*tp_vectorcall_offset*/
21025  #endif
21026  0, /*tp_getattr*/
21027  0, /*tp_setattr*/
21028  #if PY_MAJOR_VERSION < 3
21029  0, /*tp_compare*/
21030  #endif
21031  #if PY_MAJOR_VERSION >= 3
21032  0, /*tp_as_async*/
21033  #endif
21034  __pyx_memoryview___repr__, /*tp_repr*/
21035  0, /*tp_as_number*/
21036  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
21037  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
21038  0, /*tp_hash*/
21039  0, /*tp_call*/
21040  __pyx_memoryview___str__, /*tp_str*/
21041  0, /*tp_getattro*/
21042  0, /*tp_setattro*/
21043  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
21044  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
21045  0, /*tp_doc*/
21046  __pyx_tp_traverse_memoryview, /*tp_traverse*/
21047  __pyx_tp_clear_memoryview, /*tp_clear*/
21048  0, /*tp_richcompare*/
21049  0, /*tp_weaklistoffset*/
21050  0, /*tp_iter*/
21051  0, /*tp_iternext*/
21052  __pyx_methods_memoryview, /*tp_methods*/
21053  0, /*tp_members*/
21054  __pyx_getsets_memoryview, /*tp_getset*/
21055  0, /*tp_base*/
21056  0, /*tp_dict*/
21057  0, /*tp_descr_get*/
21058  0, /*tp_descr_set*/
21059  0, /*tp_dictoffset*/
21060  0, /*tp_init*/
21061  0, /*tp_alloc*/
21062  __pyx_tp_new_memoryview, /*tp_new*/
21063  0, /*tp_free*/
21064  0, /*tp_is_gc*/
21065  0, /*tp_bases*/
21066  0, /*tp_mro*/
21067  0, /*tp_cache*/
21068  0, /*tp_subclasses*/
21069  0, /*tp_weaklist*/
21070  0, /*tp_del*/
21071  0, /*tp_version_tag*/
21072  #if PY_VERSION_HEX >= 0x030400a1
21073  0, /*tp_finalize*/
21074  #endif
21075  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
21076  0, /*tp_vectorcall*/
21077  #endif
21078  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
21079  0, /*tp_print*/
21080  #endif
21081  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
21082  0, /*tp_pypy_flags*/
21083  #endif
21084 };
21085 static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
21086 
21087 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
21088  struct __pyx_memoryviewslice_obj *p;
21089  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
21090  if (unlikely(!o)) return 0;
21091  p = ((struct __pyx_memoryviewslice_obj *)o);
21092  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
21093  p->from_object = Py_None; Py_INCREF(Py_None);
21094  p->from_slice.memview = NULL;
21095  return o;
21096 }
21097 
21098 static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
21099  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
21100  #if CYTHON_USE_TP_FINALIZE
21101  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
21102  if (PyObject_CallFinalizerFromDealloc(o)) return;
21103  }
21104  #endif
21105  PyObject_GC_UnTrack(o);
21106  {
21107  PyObject *etype, *eval, *etb;
21108  PyErr_Fetch(&etype, &eval, &etb);
21109  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
21110  __pyx_memoryviewslice___dealloc__(o);
21111  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
21112  PyErr_Restore(etype, eval, etb);
21113  }
21114  Py_CLEAR(p->from_object);
21115  PyObject_GC_Track(o);
21116  __pyx_tp_dealloc_memoryview(o);
21117 }
21118 
21119 static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
21120  int e;
21121  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
21122  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
21123  if (p->from_object) {
21124  e = (*v)(p->from_object, a); if (e) return e;
21125  }
21126  return 0;
21127 }
21128 
21129 static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
21130  PyObject* tmp;
21131  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
21132  __pyx_tp_clear_memoryview(o);
21133  tmp = ((PyObject*)p->from_object);
21134  p->from_object = Py_None; Py_INCREF(Py_None);
21135  Py_XDECREF(tmp);
21136  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
21137  return 0;
21138 }
21139 
21140 static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
21141  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
21142 }
21143 
21144 static PyMethodDef __pyx_methods__memoryviewslice[] = {
21145  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
21146  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
21147  {0, 0, 0, 0}
21148 };
21149 
21150 static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
21151  {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
21152  {0, 0, 0, 0, 0}
21153 };
21154 
21155 static PyTypeObject __pyx_type___pyx_memoryviewslice = {
21156  PyVarObject_HEAD_INIT(0, 0)
21157  "imate._c_linear_operator.py_c_linear_operator._memoryviewslice", /*tp_name*/
21158  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
21159  0, /*tp_itemsize*/
21160  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
21161  #if PY_VERSION_HEX < 0x030800b4
21162  0, /*tp_print*/
21163  #endif
21164  #if PY_VERSION_HEX >= 0x030800b4
21165  0, /*tp_vectorcall_offset*/
21166  #endif
21167  0, /*tp_getattr*/
21168  0, /*tp_setattr*/
21169  #if PY_MAJOR_VERSION < 3
21170  0, /*tp_compare*/
21171  #endif
21172  #if PY_MAJOR_VERSION >= 3
21173  0, /*tp_as_async*/
21174  #endif
21175  #if CYTHON_COMPILING_IN_PYPY
21176  __pyx_memoryview___repr__, /*tp_repr*/
21177  #else
21178  0, /*tp_repr*/
21179  #endif
21180  0, /*tp_as_number*/
21181  0, /*tp_as_sequence*/
21182  0, /*tp_as_mapping*/
21183  0, /*tp_hash*/
21184  0, /*tp_call*/
21185  #if CYTHON_COMPILING_IN_PYPY
21186  __pyx_memoryview___str__, /*tp_str*/
21187  #else
21188  0, /*tp_str*/
21189  #endif
21190  0, /*tp_getattro*/
21191  0, /*tp_setattro*/
21192  0, /*tp_as_buffer*/
21193  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
21194  "Internal class for passing memoryview slices to Python", /*tp_doc*/
21195  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
21196  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
21197  0, /*tp_richcompare*/
21198  0, /*tp_weaklistoffset*/
21199  0, /*tp_iter*/
21200  0, /*tp_iternext*/
21201  __pyx_methods__memoryviewslice, /*tp_methods*/
21202  0, /*tp_members*/
21203  __pyx_getsets__memoryviewslice, /*tp_getset*/
21204  0, /*tp_base*/
21205  0, /*tp_dict*/
21206  0, /*tp_descr_get*/
21207  0, /*tp_descr_set*/
21208  0, /*tp_dictoffset*/
21209  0, /*tp_init*/
21210  0, /*tp_alloc*/
21211  __pyx_tp_new__memoryviewslice, /*tp_new*/
21212  0, /*tp_free*/
21213  0, /*tp_is_gc*/
21214  0, /*tp_bases*/
21215  0, /*tp_mro*/
21216  0, /*tp_cache*/
21217  0, /*tp_subclasses*/
21218  0, /*tp_weaklist*/
21219  0, /*tp_del*/
21220  0, /*tp_version_tag*/
21221  #if PY_VERSION_HEX >= 0x030400a1
21222  0, /*tp_finalize*/
21223  #endif
21224  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
21225  0, /*tp_vectorcall*/
21226  #endif
21227  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
21228  0, /*tp_print*/
21229  #endif
21230  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
21231  0, /*tp_pypy_flags*/
21232  #endif
21233 };
21234 
21235 static PyMethodDef __pyx_methods[] = {
21236  {0, 0, 0, 0}
21237 };
21238 
21239 #if PY_MAJOR_VERSION >= 3
21240 #if CYTHON_PEP489_MULTI_PHASE_INIT
21241 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
21242 static int __pyx_pymod_exec_py_c_linear_operator(PyObject* module); /*proto*/
21243 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
21244  {Py_mod_create, (void*)__pyx_pymod_create},
21245  {Py_mod_exec, (void*)__pyx_pymod_exec_py_c_linear_operator},
21246  {0, NULL}
21247 };
21248 #endif
21249 
21250 static struct PyModuleDef __pyx_moduledef = {
21251  PyModuleDef_HEAD_INIT,
21252  "py_c_linear_operator",
21253  0, /* m_doc */
21254  #if CYTHON_PEP489_MULTI_PHASE_INIT
21255  0, /* m_size */
21256  #else
21257  -1, /* m_size */
21258  #endif
21259  __pyx_methods /* m_methods */,
21260  #if CYTHON_PEP489_MULTI_PHASE_INIT
21261  __pyx_moduledef_slots, /* m_slots */
21262  #else
21263  NULL, /* m_reload */
21264  #endif
21265  NULL, /* m_traverse */
21266  NULL, /* m_clear */
21267  NULL /* m_free */
21268 };
21269 #endif
21270 #ifndef CYTHON_SMALL_CODE
21271 #if defined(__clang__)
21272  #define CYTHON_SMALL_CODE
21273 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
21274  #define CYTHON_SMALL_CODE __attribute__((cold))
21275 #else
21276  #define CYTHON_SMALL_CODE
21277 #endif
21278 #endif
21279 
21280 static __Pyx_StringTabEntry __pyx_string_tab[] = {
21281  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
21282  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
21283  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
21284  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
21285  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
21286  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
21287  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
21288  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
21289  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
21290  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
21291  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
21292  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
21293  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
21294  {&__pyx_kp_u_LinearOperator_object_is_s, __pyx_k_LinearOperator_object_is_s, sizeof(__pyx_k_LinearOperator_object_is_s), 0, 1, 0, 0},
21295  {&__pyx_kp_u_Linear_operator_data_type_is_not, __pyx_k_Linear_operator_data_type_is_not, sizeof(__pyx_k_Linear_operator_data_type_is_not), 0, 1, 0, 0},
21296  {&__pyx_kp_u_Linear_operator_double_type_is_n, __pyx_k_Linear_operator_double_type_is_n, sizeof(__pyx_k_Linear_operator_double_type_is_n), 0, 1, 0, 0},
21297  {&__pyx_kp_u_Linear_operator_float_type_is_no, __pyx_k_Linear_operator_float_type_is_no, sizeof(__pyx_k_Linear_operator_float_type_is_no), 0, 1, 0, 0},
21298  {&__pyx_kp_u_Linear_operator_is_not_set, __pyx_k_Linear_operator_is_not_set, sizeof(__pyx_k_Linear_operator_is_not_set), 0, 1, 0, 0},
21299  {&__pyx_kp_u_Linear_operator_long_double_type, __pyx_k_Linear_operator_long_double_type, sizeof(__pyx_k_Linear_operator_long_double_type), 0, 1, 0, 0},
21300  {&__pyx_kp_u_LongIndexType_has_an_unconventi, __pyx_k_LongIndexType_has_an_unconventi, sizeof(__pyx_k_LongIndexType_has_an_unconventi), 0, 1, 0, 0},
21301  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
21302  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
21303  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
21304  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
21305  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
21306  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
21307  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
21308  {&__pyx_kp_u_The_input_vector_and_product_sho, __pyx_k_The_input_vector_and_product_sho, sizeof(__pyx_k_The_input_vector_and_product_sho), 0, 1, 0, 0},
21309  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
21310  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
21311  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
21312  {&__pyx_kp_u_Vector_type_should_be_either_flo, __pyx_k_Vector_type_should_be_either_flo, sizeof(__pyx_k_Vector_type_should_be_either_flo), 0, 1, 0, 0},
21313  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
21314  {&__pyx_kp_u_Wrong_accessors_is_called_The_ty, __pyx_k_Wrong_accessors_is_called_The_ty, sizeof(__pyx_k_Wrong_accessors_is_called_The_ty), 0, 1, 0, 0},
21315  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
21316  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
21317  {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
21318  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
21319  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
21320  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
21321  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
21322  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
21323  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
21324  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
21325  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
21326  {&__pyx_n_s_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 0, 0, 1, 1},
21327  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
21328  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
21329  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
21330  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
21331  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
21332  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
21333  {&__pyx_n_b_float128, __pyx_k_float128, sizeof(__pyx_k_float128), 0, 0, 0, 1},
21334  {&__pyx_n_u_float128, __pyx_k_float128, sizeof(__pyx_k_float128), 0, 1, 0, 1},
21335  {&__pyx_n_b_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 0, 1},
21336  {&__pyx_n_u_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 1, 0, 1},
21337  {&__pyx_n_b_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 0, 1},
21338  {&__pyx_n_u_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 1, 0, 1},
21339  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
21340  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
21341  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
21342  {&__pyx_n_s_get_data_type_name, __pyx_k_get_data_type_name, sizeof(__pyx_k_get_data_type_name), 0, 0, 1, 1},
21343  {&__pyx_n_s_get_num_parameters, __pyx_k_get_num_parameters, sizeof(__pyx_k_get_num_parameters), 0, 0, 1, 1},
21344  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
21345  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
21346  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
21347  {&__pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_k_imate__c_linear_operator_py_c_li, sizeof(__pyx_k_imate__c_linear_operator_py_c_li), 0, 0, 1, 0},
21348  {&__pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_k_imate__c_linear_operator_py_c_li_2, sizeof(__pyx_k_imate__c_linear_operator_py_c_li_2), 0, 0, 1, 1},
21349  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
21350  {&__pyx_n_s_isscalar, __pyx_k_isscalar, sizeof(__pyx_k_isscalar), 0, 0, 1, 1},
21351  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
21352  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
21353  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
21354  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
21355  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
21356  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
21357  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
21358  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
21359  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
21360  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
21361  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
21362  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
21363  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
21364  {&__pyx_n_s_parameters, __pyx_k_parameters, sizeof(__pyx_k_parameters), 0, 0, 1, 1},
21365  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
21366  {&__pyx_n_s_product, __pyx_k_product, sizeof(__pyx_k_product), 0, 0, 1, 1},
21367  {&__pyx_n_s_pycLinearOperator, __pyx_k_pycLinearOperator, sizeof(__pyx_k_pycLinearOperator), 0, 0, 1, 1},
21368  {&__pyx_n_s_pycLinearOperator___reduce_cytho, __pyx_k_pycLinearOperator___reduce_cytho, sizeof(__pyx_k_pycLinearOperator___reduce_cytho), 0, 0, 1, 1},
21369  {&__pyx_n_s_pycLinearOperator___setstate_cyt, __pyx_k_pycLinearOperator___setstate_cyt, sizeof(__pyx_k_pycLinearOperator___setstate_cyt), 0, 0, 1, 1},
21370  {&__pyx_n_s_pycLinearOperator_dot, __pyx_k_pycLinearOperator_dot, sizeof(__pyx_k_pycLinearOperator_dot), 0, 0, 1, 1},
21371  {&__pyx_n_s_pycLinearOperator_get_data_type, __pyx_k_pycLinearOperator_get_data_type, sizeof(__pyx_k_pycLinearOperator_get_data_type), 0, 0, 1, 1},
21372  {&__pyx_n_s_pycLinearOperator_get_num_parame, __pyx_k_pycLinearOperator_get_num_parame, sizeof(__pyx_k_pycLinearOperator_get_num_parame), 0, 0, 1, 1},
21373  {&__pyx_n_s_pycLinearOperator_set_parameters, __pyx_k_pycLinearOperator_set_parameters, sizeof(__pyx_k_pycLinearOperator_set_parameters), 0, 0, 1, 1},
21374  {&__pyx_n_s_pycLinearOperator_transpose_dot, __pyx_k_pycLinearOperator_transpose_dot, sizeof(__pyx_k_pycLinearOperator_transpose_dot), 0, 0, 1, 1},
21375  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
21376  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
21377  {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
21378  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
21379  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
21380  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
21381  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
21382  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
21383  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
21384  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
21385  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
21386  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
21387  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
21388  {&__pyx_n_s_set_parameters, __pyx_k_set_parameters, sizeof(__pyx_k_set_parameters), 0, 0, 1, 1},
21389  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
21390  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
21391  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
21392  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
21393  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
21394  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
21395  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
21396  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
21397  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
21398  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
21399  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
21400  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
21401  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
21402  {&__pyx_n_s_transpose_dot, __pyx_k_transpose_dot, sizeof(__pyx_k_transpose_dot), 0, 0, 1, 1},
21403  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
21404  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
21405  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
21406  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
21407  {&__pyx_n_s_vector, __pyx_k_vector, sizeof(__pyx_k_vector), 0, 0, 1, 1},
21408  {0, 0, 0, 0, 0, 0, 0}
21409 };
21410 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
21411  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 67, __pyx_L1_error)
21412  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 107, __pyx_L1_error)
21413  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 158, __pyx_L1_error)
21414  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 149, __pyx_L1_error)
21415  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 152, __pyx_L1_error)
21416  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 181, __pyx_L1_error)
21417  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 406, __pyx_L1_error)
21418  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 615, __pyx_L1_error)
21419  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 834, __pyx_L1_error)
21420  return 0;
21421  __pyx_L1_error:;
21422  return -1;
21423 }
21424 
21425 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
21426  __Pyx_RefNannyDeclarations
21427  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
21428 
21429  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":67
21430  * self.long_index_type_name = r'int64'
21431  * else:
21432  * raise TypeError('"LongIndexType" has an unconventional byte size.') # <<<<<<<<<<<<<<
21433  *
21434  * # ===========
21435  */
21436  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_LongIndexType_has_an_unconventi); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 67, __pyx_L1_error)
21437  __Pyx_GOTREF(__pyx_tuple_);
21438  __Pyx_GIVEREF(__pyx_tuple_);
21439 
21440  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":107
21441  * return self.Aop_long_double.get_num_rows()
21442  * else:
21443  * raise ValueError('Linear operator is not set.') # <<<<<<<<<<<<<<
21444  *
21445  * # ===============
21446  */
21447  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_Linear_operator_is_not_set); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 107, __pyx_L1_error)
21448  __Pyx_GOTREF(__pyx_tuple__2);
21449  __Pyx_GIVEREF(__pyx_tuple__2);
21450 
21451  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":158
21452  *
21453  * if self.data_type_name == NULL:
21454  * raise RuntimeError('Linear operator data type is not set.') # <<<<<<<<<<<<<<
21455  *
21456  * return self.data_type_name
21457  */
21458  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Linear_operator_data_type_is_not); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 158, __pyx_L1_error)
21459  __Pyx_GOTREF(__pyx_tuple__5);
21460  __Pyx_GIVEREF(__pyx_tuple__5);
21461 
21462  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":171
21463  *
21464  * if self.Aop_float == NULL:
21465  * raise RuntimeError('Linear operator (float type) is not set.') # <<<<<<<<<<<<<<
21466  *
21467  * if self.data_type_name != b'float32':
21468  */
21469  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Linear_operator_float_type_is_no); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 171, __pyx_L1_error)
21470  __Pyx_GOTREF(__pyx_tuple__6);
21471  __Pyx_GIVEREF(__pyx_tuple__6);
21472 
21473  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":189
21474  *
21475  * if self.Aop_double == NULL:
21476  * raise RuntimeError('Linear operator (double type) is not set.') # <<<<<<<<<<<<<<
21477  *
21478  * if self.data_type_name != b'float64':
21479  */
21480  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Linear_operator_double_type_is_n); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 189, __pyx_L1_error)
21481  __Pyx_GOTREF(__pyx_tuple__7);
21482  __Pyx_GIVEREF(__pyx_tuple__7);
21483 
21484  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":208
21485  *
21486  * if self.Aop_long_double == NULL:
21487  * raise RuntimeError('Linear operator (long double type) is not ' + # <<<<<<<<<<<<<<
21488  * 'set.')
21489  *
21490  */
21491  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Linear_operator_long_double_type); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 208, __pyx_L1_error)
21492  __Pyx_GOTREF(__pyx_tuple__8);
21493  __Pyx_GIVEREF(__pyx_tuple__8);
21494 
21495  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":243
21496  *
21497  * if vector.dtype != product.dtype:
21498  * raise TypeError('The input vector and product should have ') # <<<<<<<<<<<<<<
21499  *
21500  * # Declare memory views for input vector
21501  */
21502  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_The_input_vector_and_product_sho); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 243, __pyx_L1_error)
21503  __Pyx_GOTREF(__pyx_tuple__11);
21504  __Pyx_GIVEREF(__pyx_tuple__11);
21505 
21506  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":335
21507  *
21508  * else:
21509  * raise TypeError('Vector type should be either "float32", ' + # <<<<<<<<<<<<<<
21510  * '"float64", or "float128".')
21511  *
21512  */
21513  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_Vector_type_should_be_either_flo); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 335, __pyx_L1_error)
21514  __Pyx_GOTREF(__pyx_tuple__12);
21515  __Pyx_GIVEREF(__pyx_tuple__12);
21516 
21517  /* "(tree fragment)":2
21518  * def __reduce_cython__(self):
21519  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21520  * def __setstate_cython__(self, __pyx_state):
21521  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21522  */
21523  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 2, __pyx_L1_error)
21524  __Pyx_GOTREF(__pyx_tuple__15);
21525  __Pyx_GIVEREF(__pyx_tuple__15);
21526 
21527  /* "(tree fragment)":4
21528  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21529  * def __setstate_cython__(self, __pyx_state):
21530  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21531  */
21532  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 4, __pyx_L1_error)
21533  __Pyx_GOTREF(__pyx_tuple__17);
21534  __Pyx_GIVEREF(__pyx_tuple__17);
21535 
21536  /* "View.MemoryView":134
21537  *
21538  * if not self.ndim:
21539  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
21540  *
21541  * if itemsize <= 0:
21542  */
21543  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 134, __pyx_L1_error)
21544  __Pyx_GOTREF(__pyx_tuple__18);
21545  __Pyx_GIVEREF(__pyx_tuple__18);
21546 
21547  /* "View.MemoryView":137
21548  *
21549  * if itemsize <= 0:
21550  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
21551  *
21552  * if not isinstance(format, bytes):
21553  */
21554  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 137, __pyx_L1_error)
21555  __Pyx_GOTREF(__pyx_tuple__19);
21556  __Pyx_GIVEREF(__pyx_tuple__19);
21557 
21558  /* "View.MemoryView":149
21559  *
21560  * if not self._shape:
21561  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
21562  *
21563  *
21564  */
21565  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 149, __pyx_L1_error)
21566  __Pyx_GOTREF(__pyx_tuple__20);
21567  __Pyx_GIVEREF(__pyx_tuple__20);
21568 
21569  /* "View.MemoryView":177
21570  * self.data = <char *>malloc(self.len)
21571  * if not self.data:
21572  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
21573  *
21574  * if self.dtype_is_object:
21575  */
21576  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 177, __pyx_L1_error)
21577  __Pyx_GOTREF(__pyx_tuple__21);
21578  __Pyx_GIVEREF(__pyx_tuple__21);
21579 
21580  /* "View.MemoryView":193
21581  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21582  * if not (flags & bufmode):
21583  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
21584  * info.buf = self.data
21585  * info.len = self.len
21586  */
21587  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 193, __pyx_L1_error)
21588  __Pyx_GOTREF(__pyx_tuple__22);
21589  __Pyx_GIVEREF(__pyx_tuple__22);
21590 
21591  /* "(tree fragment)":2
21592  * def __reduce_cython__(self):
21593  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21594  * def __setstate_cython__(self, __pyx_state):
21595  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21596  */
21597  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 2, __pyx_L1_error)
21598  __Pyx_GOTREF(__pyx_tuple__23);
21599  __Pyx_GIVEREF(__pyx_tuple__23);
21600 
21601  /* "(tree fragment)":4
21602  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21603  * def __setstate_cython__(self, __pyx_state):
21604  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21605  */
21606  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 4, __pyx_L1_error)
21607  __Pyx_GOTREF(__pyx_tuple__24);
21608  __Pyx_GIVEREF(__pyx_tuple__24);
21609 
21610  /* "View.MemoryView":420
21611  * def __setitem__(memoryview self, object index, object value):
21612  * if self.view.readonly:
21613  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
21614  *
21615  * have_slices, index = _unellipsify(index, self.view.ndim)
21616  */
21617  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 420, __pyx_L1_error)
21618  __Pyx_GOTREF(__pyx_tuple__25);
21619  __Pyx_GIVEREF(__pyx_tuple__25);
21620 
21621  /* "View.MemoryView":497
21622  * result = struct.unpack(self.view.format, bytesitem)
21623  * except struct.error:
21624  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
21625  * else:
21626  * if len(self.view.format) == 1:
21627  */
21628  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 497, __pyx_L1_error)
21629  __Pyx_GOTREF(__pyx_tuple__26);
21630  __Pyx_GIVEREF(__pyx_tuple__26);
21631 
21632  /* "View.MemoryView":522
21633  * def __getbuffer__(self, Py_buffer *info, int flags):
21634  * if flags & PyBUF_WRITABLE and self.view.readonly:
21635  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
21636  *
21637  * if flags & PyBUF_ND:
21638  */
21639  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 522, __pyx_L1_error)
21640  __Pyx_GOTREF(__pyx_tuple__27);
21641  __Pyx_GIVEREF(__pyx_tuple__27);
21642 
21643  /* "View.MemoryView":572
21644  * if self.view.strides == NULL:
21645  *
21646  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
21647  *
21648  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
21649  */
21650  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 572, __pyx_L1_error)
21651  __Pyx_GOTREF(__pyx_tuple__28);
21652  __Pyx_GIVEREF(__pyx_tuple__28);
21653 
21654  /* "View.MemoryView":579
21655  * def suboffsets(self):
21656  * if self.view.suboffsets == NULL:
21657  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
21658  *
21659  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
21660  */
21661  __pyx_tuple__29 = PyTuple_New(1); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 579, __pyx_L1_error)
21662  __Pyx_GOTREF(__pyx_tuple__29);
21663  __Pyx_INCREF(__pyx_int_neg_1);
21664  __Pyx_GIVEREF(__pyx_int_neg_1);
21665  PyTuple_SET_ITEM(__pyx_tuple__29, 0, __pyx_int_neg_1);
21666  __Pyx_GIVEREF(__pyx_tuple__29);
21667 
21668  /* "(tree fragment)":2
21669  * def __reduce_cython__(self):
21670  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21671  * def __setstate_cython__(self, __pyx_state):
21672  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21673  */
21674  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 2, __pyx_L1_error)
21675  __Pyx_GOTREF(__pyx_tuple__30);
21676  __Pyx_GIVEREF(__pyx_tuple__30);
21677 
21678  /* "(tree fragment)":4
21679  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21680  * def __setstate_cython__(self, __pyx_state):
21681  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21682  */
21683  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 4, __pyx_L1_error)
21684  __Pyx_GOTREF(__pyx_tuple__31);
21685  __Pyx_GIVEREF(__pyx_tuple__31);
21686 
21687  /* "View.MemoryView":684
21688  * if item is Ellipsis:
21689  * if not seen_ellipsis:
21690  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
21691  * seen_ellipsis = True
21692  * else:
21693  */
21694  __pyx_slice__32 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__32)) __PYX_ERR(1, 684, __pyx_L1_error)
21695  __Pyx_GOTREF(__pyx_slice__32);
21696  __Pyx_GIVEREF(__pyx_slice__32);
21697 
21698  /* "View.MemoryView":705
21699  * for suboffset in suboffsets[:ndim]:
21700  * if suboffset >= 0:
21701  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
21702  *
21703  *
21704  */
21705  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 705, __pyx_L1_error)
21706  __Pyx_GOTREF(__pyx_tuple__33);
21707  __Pyx_GIVEREF(__pyx_tuple__33);
21708 
21709  /* "(tree fragment)":2
21710  * def __reduce_cython__(self):
21711  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21712  * def __setstate_cython__(self, __pyx_state):
21713  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21714  */
21715  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 2, __pyx_L1_error)
21716  __Pyx_GOTREF(__pyx_tuple__34);
21717  __Pyx_GIVEREF(__pyx_tuple__34);
21718 
21719  /* "(tree fragment)":4
21720  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21721  * def __setstate_cython__(self, __pyx_state):
21722  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21723  */
21724  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 4, __pyx_L1_error)
21725  __Pyx_GOTREF(__pyx_tuple__35);
21726  __Pyx_GIVEREF(__pyx_tuple__35);
21727  __pyx_tuple__37 = PyTuple_Pack(3, __pyx_int_184977713, __pyx_int_136983863, __pyx_int_112105877); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 4, __pyx_L1_error)
21728  __Pyx_GOTREF(__pyx_tuple__37);
21729  __Pyx_GIVEREF(__pyx_tuple__37);
21730 
21731  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":133
21732  * # ==================
21733  *
21734  * def get_num_parameters(self): # <<<<<<<<<<<<<<
21735  * """
21736  * :return: Number of parameters.
21737  */
21738  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 133, __pyx_L1_error)
21739  __Pyx_GOTREF(__pyx_tuple__38);
21740  __Pyx_GIVEREF(__pyx_tuple__38);
21741  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_n_s_get_num_parameters, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 133, __pyx_L1_error)
21742 
21743  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":153
21744  * # ==================
21745  *
21746  * def get_data_type_name(self): # <<<<<<<<<<<<<<
21747  * """
21748  * """
21749  */
21750  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 153, __pyx_L1_error)
21751  __Pyx_GOTREF(__pyx_tuple__39);
21752  __Pyx_GIVEREF(__pyx_tuple__39);
21753  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_n_s_get_data_type_name, 153, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 153, __pyx_L1_error)
21754 
21755  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":222
21756  * # ==============
21757  *
21758  * def set_parameters(self, parameters_): # <<<<<<<<<<<<<<
21759  * """
21760  * This function is only used for the test unit of this class. For the
21761  */
21762  __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_parameters); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 222, __pyx_L1_error)
21763  __Pyx_GOTREF(__pyx_tuple__40);
21764  __Pyx_GIVEREF(__pyx_tuple__40);
21765  __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_n_s_set_parameters, 222, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 222, __pyx_L1_error)
21766 
21767  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":238
21768  * # ===
21769  *
21770  * cpdef void dot(self, vector, product) except *: # <<<<<<<<<<<<<<
21771  * """
21772  * """
21773  */
21774  __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_vector, __pyx_n_s_product); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 238, __pyx_L1_error)
21775  __Pyx_GOTREF(__pyx_tuple__41);
21776  __Pyx_GIVEREF(__pyx_tuple__41);
21777  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_n_s_dot, 238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 238, __pyx_L1_error)
21778 
21779  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":342
21780  * # =============
21781  *
21782  * cpdef void transpose_dot(self, vector, product) except *: # <<<<<<<<<<<<<<
21783  * """
21784  * """
21785  */
21786  __pyx_tuple__42 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_vector, __pyx_n_s_product); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 342, __pyx_L1_error)
21787  __Pyx_GOTREF(__pyx_tuple__42);
21788  __Pyx_GIVEREF(__pyx_tuple__42);
21789  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_n_s_transpose_dot, 342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 342, __pyx_L1_error)
21790 
21791  /* "(tree fragment)":1
21792  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
21793  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21794  * def __setstate_cython__(self, __pyx_state):
21795  */
21796  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(1, 1, __pyx_L1_error)
21797  __Pyx_GOTREF(__pyx_tuple__43);
21798  __Pyx_GIVEREF(__pyx_tuple__43);
21799  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(1, 1, __pyx_L1_error)
21800 
21801  /* "(tree fragment)":3
21802  * def __reduce_cython__(self):
21803  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21804  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
21805  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21806  */
21807  __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 3, __pyx_L1_error)
21808  __Pyx_GOTREF(__pyx_tuple__44);
21809  __Pyx_GIVEREF(__pyx_tuple__44);
21810  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(1, 3, __pyx_L1_error)
21811 
21812  /* "View.MemoryView":287
21813  * return self.name
21814  *
21815  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
21816  * cdef strided = Enum("<strided and direct>") # default
21817  * cdef indirect = Enum("<strided and indirect>")
21818  */
21819  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 287, __pyx_L1_error)
21820  __Pyx_GOTREF(__pyx_tuple__45);
21821  __Pyx_GIVEREF(__pyx_tuple__45);
21822 
21823  /* "View.MemoryView":288
21824  *
21825  * cdef generic = Enum("<strided and direct or indirect>")
21826  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
21827  * cdef indirect = Enum("<strided and indirect>")
21828  *
21829  */
21830  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 288, __pyx_L1_error)
21831  __Pyx_GOTREF(__pyx_tuple__46);
21832  __Pyx_GIVEREF(__pyx_tuple__46);
21833 
21834  /* "View.MemoryView":289
21835  * cdef generic = Enum("<strided and direct or indirect>")
21836  * cdef strided = Enum("<strided and direct>") # default
21837  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
21838  *
21839  *
21840  */
21841  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 289, __pyx_L1_error)
21842  __Pyx_GOTREF(__pyx_tuple__47);
21843  __Pyx_GIVEREF(__pyx_tuple__47);
21844 
21845  /* "View.MemoryView":292
21846  *
21847  *
21848  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
21849  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
21850  *
21851  */
21852  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 292, __pyx_L1_error)
21853  __Pyx_GOTREF(__pyx_tuple__48);
21854  __Pyx_GIVEREF(__pyx_tuple__48);
21855 
21856  /* "View.MemoryView":293
21857  *
21858  * cdef contiguous = Enum("<contiguous and direct>")
21859  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
21860  *
21861  *
21862  */
21863  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 293, __pyx_L1_error)
21864  __Pyx_GOTREF(__pyx_tuple__49);
21865  __Pyx_GIVEREF(__pyx_tuple__49);
21866 
21867  /* "(tree fragment)":1
21868  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
21869  * cdef object __pyx_PickleError
21870  * cdef object __pyx_result
21871  */
21872  __pyx_tuple__50 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(1, 1, __pyx_L1_error)
21873  __Pyx_GOTREF(__pyx_tuple__50);
21874  __Pyx_GIVEREF(__pyx_tuple__50);
21875  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(1, 1, __pyx_L1_error)
21876  __Pyx_RefNannyFinishContext();
21877  return 0;
21878  __pyx_L1_error:;
21879  __Pyx_RefNannyFinishContext();
21880  return -1;
21881 }
21882 
21883 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
21884  /* AssertionsEnabled.init */
21885  __Pyx_init_assertions_enabled();
21886 
21887 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
21888 
21889  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21890  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
21891  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
21892  __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)
21893  __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)
21894  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
21895  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
21896  return 0;
21897  __pyx_L1_error:;
21898  return -1;
21899 }
21900 
21901 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
21902 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
21903 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
21904 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
21905 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
21906 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
21907 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
21908 
21909 static int __Pyx_modinit_global_init_code(void) {
21910  __Pyx_RefNannyDeclarations
21911  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
21912  /*--- Global init code ---*/
21913  generic = Py_None; Py_INCREF(Py_None);
21914  strided = Py_None; Py_INCREF(Py_None);
21915  indirect = Py_None; Py_INCREF(Py_None);
21916  contiguous = Py_None; Py_INCREF(Py_None);
21917  indirect_contiguous = Py_None; Py_INCREF(Py_None);
21918  __Pyx_RefNannyFinishContext();
21919  return 0;
21920 }
21921 
21922 static int __Pyx_modinit_variable_export_code(void) {
21923  __Pyx_RefNannyDeclarations
21924  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
21925  /*--- Variable export code ---*/
21926  __Pyx_RefNannyFinishContext();
21927  return 0;
21928 }
21929 
21930 static int __Pyx_modinit_function_export_code(void) {
21931  __Pyx_RefNannyDeclarations
21932  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
21933  /*--- Function export code ---*/
21934  __Pyx_RefNannyFinishContext();
21935  return 0;
21936 }
21937 
21938 static int __Pyx_modinit_type_init_code(void) {
21939  __Pyx_RefNannyDeclarations
21940  int __pyx_lineno = 0;
21941  const char *__pyx_filename = NULL;
21942  int __pyx_clineno = 0;
21943  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
21944  /*--- Type init code ---*/
21945  __pyx_vtabptr_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator = &__pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
21946  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.get_num_rows = (LongIndexType (*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_rows;
21947  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.get_num_columns = (LongIndexType (*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_columns;
21948  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.get_linear_operator_float = (cLinearOperator<float> *(*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_float;
21949  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.get_linear_operator_double = (cLinearOperator<double> *(*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_double;
21950  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.get_linear_operator_long_double = (cLinearOperator<long double> *(*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_long_double;
21951  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.dot = (void (*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_dot;
21952  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.transpose_dot = (void (*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_transpose_dot;
21953  if (PyType_Ready(&__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
21954  #if PY_VERSION_HEX < 0x030800B1
21955  __pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.tp_print = 0;
21956  #endif
21957  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.tp_dictoffset && __pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.tp_getattro == PyObject_GenericGetAttr)) {
21958  __pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.tp_getattro = __Pyx_PyObject_GenericGetAttr;
21959  }
21960  if (__Pyx_SetVtable(__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.tp_dict, __pyx_vtabptr_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
21961  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pycLinearOperator, (PyObject *)&__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
21962  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
21963  __pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator = &__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
21964  __pyx_vtabptr_array = &__pyx_vtable_array;
21965  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
21966  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 106, __pyx_L1_error)
21967  #if PY_VERSION_HEX < 0x030800B1
21968  __pyx_type___pyx_array.tp_print = 0;
21969  #endif
21970  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 106, __pyx_L1_error)
21971  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 106, __pyx_L1_error)
21972  __pyx_array_type = &__pyx_type___pyx_array;
21973  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 280, __pyx_L1_error)
21974  #if PY_VERSION_HEX < 0x030800B1
21975  __pyx_type___pyx_MemviewEnum.tp_print = 0;
21976  #endif
21977  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
21978  __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
21979  }
21980  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 280, __pyx_L1_error)
21981  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
21982  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
21983  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
21984  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
21985  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
21986  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
21987  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
21988  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
21989  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
21990  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 331, __pyx_L1_error)
21991  #if PY_VERSION_HEX < 0x030800B1
21992  __pyx_type___pyx_memoryview.tp_print = 0;
21993  #endif
21994  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
21995  __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
21996  }
21997  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 331, __pyx_L1_error)
21998  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 331, __pyx_L1_error)
21999  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
22000  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
22001  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
22002  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
22003  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
22004  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
22005  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 967, __pyx_L1_error)
22006  #if PY_VERSION_HEX < 0x030800B1
22007  __pyx_type___pyx_memoryviewslice.tp_print = 0;
22008  #endif
22009  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
22010  __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
22011  }
22012  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 967, __pyx_L1_error)
22013  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 967, __pyx_L1_error)
22014  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
22015  __Pyx_RefNannyFinishContext();
22016  return 0;
22017  __pyx_L1_error:;
22018  __Pyx_RefNannyFinishContext();
22019  return -1;
22020 }
22021 
22022 static int __Pyx_modinit_type_import_code(void) {
22023  __Pyx_RefNannyDeclarations
22024  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
22025  /*--- Type import code ---*/
22026  __Pyx_RefNannyFinishContext();
22027  return 0;
22028 }
22029 
22030 static int __Pyx_modinit_variable_import_code(void) {
22031  __Pyx_RefNannyDeclarations
22032  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
22033  /*--- Variable import code ---*/
22034  __Pyx_RefNannyFinishContext();
22035  return 0;
22036 }
22037 
22038 static int __Pyx_modinit_function_import_code(void) {
22039  __Pyx_RefNannyDeclarations
22040  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
22041  /*--- Function import code ---*/
22042  __Pyx_RefNannyFinishContext();
22043  return 0;
22044 }
22045 
22046 
22047 #ifndef CYTHON_NO_PYINIT_EXPORT
22048 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
22049 #elif PY_MAJOR_VERSION < 3
22050 #ifdef __cplusplus
22051 #define __Pyx_PyMODINIT_FUNC extern "C" void
22052 #else
22053 #define __Pyx_PyMODINIT_FUNC void
22054 #endif
22055 #else
22056 #ifdef __cplusplus
22057 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
22058 #else
22059 #define __Pyx_PyMODINIT_FUNC PyObject *
22060 #endif
22061 #endif
22062 
22063 
22064 #if PY_MAJOR_VERSION < 3
22065 __Pyx_PyMODINIT_FUNC initpy_c_linear_operator(void) CYTHON_SMALL_CODE; /*proto*/
22066 __Pyx_PyMODINIT_FUNC initpy_c_linear_operator(void)
22067 #else
22068 __Pyx_PyMODINIT_FUNC PyInit_py_c_linear_operator(void) CYTHON_SMALL_CODE; /*proto*/
22069 __Pyx_PyMODINIT_FUNC PyInit_py_c_linear_operator(void)
22070 #if CYTHON_PEP489_MULTI_PHASE_INIT
22071 {
22072  return PyModuleDef_Init(&__pyx_moduledef);
22073 }
22074 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
22075  #if PY_VERSION_HEX >= 0x030700A1
22076  static PY_INT64_T main_interpreter_id = -1;
22077  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
22078  if (main_interpreter_id == -1) {
22079  main_interpreter_id = current_id;
22080  return (unlikely(current_id == -1)) ? -1 : 0;
22081  } else if (unlikely(main_interpreter_id != current_id))
22082  #else
22083  static PyInterpreterState *main_interpreter = NULL;
22084  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
22085  if (!main_interpreter) {
22086  main_interpreter = current_interpreter;
22087  } else if (unlikely(main_interpreter != current_interpreter))
22088  #endif
22089  {
22090  PyErr_SetString(
22091  PyExc_ImportError,
22092  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
22093  return -1;
22094  }
22095  return 0;
22096 }
22097 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
22098  PyObject *value = PyObject_GetAttrString(spec, from_name);
22099  int result = 0;
22100  if (likely(value)) {
22101  if (allow_none || value != Py_None) {
22102  result = PyDict_SetItemString(moddict, to_name, value);
22103  }
22104  Py_DECREF(value);
22105  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
22106  PyErr_Clear();
22107  } else {
22108  result = -1;
22109  }
22110  return result;
22111 }
22112 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
22113  PyObject *module = NULL, *moddict, *modname;
22114  if (__Pyx_check_single_interpreter())
22115  return NULL;
22116  if (__pyx_m)
22117  return __Pyx_NewRef(__pyx_m);
22118  modname = PyObject_GetAttrString(spec, "name");
22119  if (unlikely(!modname)) goto bad;
22120  module = PyModule_NewObject(modname);
22121  Py_DECREF(modname);
22122  if (unlikely(!module)) goto bad;
22123  moddict = PyModule_GetDict(module);
22124  if (unlikely(!moddict)) goto bad;
22125  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
22126  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
22127  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
22128  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
22129  return module;
22130 bad:
22131  Py_XDECREF(module);
22132  return NULL;
22133 }
22134 
22135 
22136 static CYTHON_SMALL_CODE int __pyx_pymod_exec_py_c_linear_operator(PyObject *__pyx_pyinit_module)
22137 #endif
22138 #endif
22139 {
22140  __Pyx_TraceDeclarations
22141  PyObject *__pyx_t_1 = NULL;
22142  static PyThread_type_lock __pyx_t_2[8];
22143  int __pyx_lineno = 0;
22144  const char *__pyx_filename = NULL;
22145  int __pyx_clineno = 0;
22146  __Pyx_RefNannyDeclarations
22147  #if CYTHON_PEP489_MULTI_PHASE_INIT
22148  if (__pyx_m) {
22149  if (__pyx_m == __pyx_pyinit_module) return 0;
22150  PyErr_SetString(PyExc_RuntimeError, "Module 'py_c_linear_operator' has already been imported. Re-initialisation is not supported.");
22151  return -1;
22152  }
22153  #elif PY_MAJOR_VERSION >= 3
22154  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
22155  #endif
22156  #if CYTHON_REFNANNY
22157 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
22158 if (!__Pyx_RefNanny) {
22159  PyErr_Clear();
22160  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
22161  if (!__Pyx_RefNanny)
22162  Py_FatalError("failed to import 'refnanny' module");
22163 }
22164 #endif
22165  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_py_c_linear_operator(void)", 0);
22166  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22167  #ifdef __Pxy_PyFrame_Initialize_Offsets
22168  __Pxy_PyFrame_Initialize_Offsets();
22169  #endif
22170  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
22171  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
22172  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
22173  #ifdef __Pyx_CyFunction_USED
22174  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22175  #endif
22176  #ifdef __Pyx_FusedFunction_USED
22177  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22178  #endif
22179  #ifdef __Pyx_Coroutine_USED
22180  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22181  #endif
22182  #ifdef __Pyx_Generator_USED
22183  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22184  #endif
22185  #ifdef __Pyx_AsyncGen_USED
22186  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22187  #endif
22188  #ifdef __Pyx_StopAsyncIteration_USED
22189  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22190  #endif
22191  /*--- Library function declarations ---*/
22192  /*--- Threads initialization code ---*/
22193  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
22194  PyEval_InitThreads();
22195  #endif
22196  /*--- Module creation code ---*/
22197  #if CYTHON_PEP489_MULTI_PHASE_INIT
22198  __pyx_m = __pyx_pyinit_module;
22199  Py_INCREF(__pyx_m);
22200  #else
22201  #if PY_MAJOR_VERSION < 3
22202  __pyx_m = Py_InitModule4("py_c_linear_operator", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
22203  #else
22204  __pyx_m = PyModule_Create(&__pyx_moduledef);
22205  #endif
22206  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
22207  #endif
22208  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
22209  Py_INCREF(__pyx_d);
22210  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
22211  Py_INCREF(__pyx_b);
22212  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
22213  Py_INCREF(__pyx_cython_runtime);
22214  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22215  /*--- Initialize various global constants etc. ---*/
22216  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22217  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
22218  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22219  #endif
22220  if (__pyx_module_is_main_imate___c_linear_operator__py_c_linear_operator) {
22221  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22222  }
22223  #if PY_MAJOR_VERSION >= 3
22224  {
22225  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
22226  if (!PyDict_GetItemString(modules, "imate._c_linear_operator.py_c_linear_operator")) {
22227  if (unlikely(PyDict_SetItemString(modules, "imate._c_linear_operator.py_c_linear_operator", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
22228  }
22229  }
22230  #endif
22231  /*--- Builtin init code ---*/
22232  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22233  /*--- Constants init code ---*/
22234  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22235  /*--- Global type/function init code ---*/
22236  (void)__Pyx_modinit_global_init_code();
22237  (void)__Pyx_modinit_variable_export_code();
22238  (void)__Pyx_modinit_function_export_code();
22239  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
22240  (void)__Pyx_modinit_type_import_code();
22241  (void)__Pyx_modinit_variable_import_code();
22242  (void)__Pyx_modinit_function_import_code();
22243  /*--- Execution code ---*/
22244  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
22245  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22246  #endif
22247  __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_py_c_linear_operator(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));
22248 
22249  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":14
22250  * # =======
22251  *
22252  * import numpy # <<<<<<<<<<<<<<
22253  * from libc.stdlib cimport exit
22254  *
22255  */
22256  __Pyx_TraceLine(14,0,__PYX_ERR(0, 14, __pyx_L1_error))
22257  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
22258  __Pyx_GOTREF(__pyx_t_1);
22259  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
22260  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22261 
22262  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":93
22263  * # ============
22264  *
22265  * cdef LongIndexType get_num_rows(self) except *: # <<<<<<<<<<<<<<
22266  * """
22267  * :return Number of rows of matrix.
22268  */
22269  __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L1_error))
22270 
22271 
22272  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":113
22273  * # ===============
22274  *
22275  * cdef LongIndexType get_num_columns(self) except *: # <<<<<<<<<<<<<<
22276  * """
22277  * :return Number of rows of matrix.
22278  */
22279  __Pyx_TraceLine(113,0,__PYX_ERR(0, 113, __pyx_L1_error))
22280 
22281 
22282  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":133
22283  * # ==================
22284  *
22285  * def get_num_parameters(self): # <<<<<<<<<<<<<<
22286  * """
22287  * :return: Number of parameters.
22288  */
22289  __Pyx_TraceLine(133,0,__PYX_ERR(0, 133, __pyx_L1_error))
22290  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator_get_num_parame, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
22291  __Pyx_GOTREF(__pyx_t_1);
22292  if (PyDict_SetItem((PyObject *)__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator->tp_dict, __pyx_n_s_get_num_parameters, __pyx_t_1) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
22293  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22294  PyType_Modified(__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator);
22295 
22296  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":153
22297  * # ==================
22298  *
22299  * def get_data_type_name(self): # <<<<<<<<<<<<<<
22300  * """
22301  * """
22302  */
22303  __Pyx_TraceLine(153,0,__PYX_ERR(0, 153, __pyx_L1_error))
22304  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator_get_data_type, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
22305  __Pyx_GOTREF(__pyx_t_1);
22306  if (PyDict_SetItem((PyObject *)__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator->tp_dict, __pyx_n_s_get_data_type_name, __pyx_t_1) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
22307  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22308  PyType_Modified(__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator);
22309 
22310  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":166
22311  * # =========================
22312  *
22313  * cdef cLinearOperator[float]* get_linear_operator_float(self) except *: # <<<<<<<<<<<<<<
22314  * """
22315  * """
22316  */
22317  __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error))
22318 
22319 
22320  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":184
22321  * # ==========================
22322  *
22323  * cdef cLinearOperator[double]* get_linear_operator_double(self) except *: # <<<<<<<<<<<<<<
22324  * """
22325  * """
22326  */
22327  __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error))
22328 
22329 
22330  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":202
22331  * # ===============================
22332  *
22333  * cdef cLinearOperator[long double]* get_linear_operator_long_double( # <<<<<<<<<<<<<<
22334  * self) except*:
22335  * """
22336  */
22337  __Pyx_TraceLine(202,0,__PYX_ERR(0, 202, __pyx_L1_error))
22338 
22339 
22340  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":222
22341  * # ==============
22342  *
22343  * def set_parameters(self, parameters_): # <<<<<<<<<<<<<<
22344  * """
22345  * This function is only used for the test unit of this class. For the
22346  */
22347  __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error))
22348  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator_set_parameters, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
22349  __Pyx_GOTREF(__pyx_t_1);
22350  if (PyDict_SetItem((PyObject *)__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator->tp_dict, __pyx_n_s_set_parameters, __pyx_t_1) < 0) __PYX_ERR(0, 222, __pyx_L1_error)
22351  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22352  PyType_Modified(__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator);
22353 
22354  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":238
22355  * # ===
22356  *
22357  * cpdef void dot(self, vector, product) except *: # <<<<<<<<<<<<<<
22358  * """
22359  * """
22360  */
22361  __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error))
22362 
22363  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator_dot, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
22364  __Pyx_GOTREF(__pyx_t_1);
22365  if (PyDict_SetItem((PyObject *)__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator->tp_dict, __pyx_n_s_dot, __pyx_t_1) < 0) __PYX_ERR(0, 238, __pyx_L1_error)
22366  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22367  PyType_Modified(__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator);
22368 
22369  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":342
22370  * # =============
22371  *
22372  * cpdef void transpose_dot(self, vector, product) except *: # <<<<<<<<<<<<<<
22373  * """
22374  * """
22375  */
22376  __Pyx_TraceLine(342,0,__PYX_ERR(0, 342, __pyx_L1_error))
22377 
22378  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator_transpose_dot, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
22379  __Pyx_GOTREF(__pyx_t_1);
22380  if (PyDict_SetItem((PyObject *)__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator->tp_dict, __pyx_n_s_transpose_dot, __pyx_t_1) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
22381  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22382  PyType_Modified(__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator);
22383 
22384  /* "(tree fragment)":1
22385  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22386  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22387  * def __setstate_cython__(self, __pyx_state):
22388  */
22389  __Pyx_TraceLine(1,0,__PYX_ERR(1, 1, __pyx_L1_error))
22390  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator___reduce_cytho, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
22391  __Pyx_GOTREF(__pyx_t_1);
22392  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
22393  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22394 
22395  /* "(tree fragment)":3
22396  * def __reduce_cython__(self):
22397  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22398  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22399  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22400  */
22401  __Pyx_TraceLine(3,0,__PYX_ERR(1, 3, __pyx_L1_error))
22402  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator___setstate_cyt, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
22403  __Pyx_GOTREF(__pyx_t_1);
22404  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
22405  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22406 
22407  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":1
22408  * # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu> # <<<<<<<<<<<<<<
22409  * # SPDX-License-Identifier: BSD-3-Clause
22410  * # SPDX-FileType: SOURCE
22411  */
22412  __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error))
22413  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
22414  __Pyx_GOTREF(__pyx_t_1);
22415  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22416  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22417 
22418  /* "View.MemoryView":210
22419  * info.obj = self
22420  *
22421  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
22422  *
22423  * def __dealloc__(array self):
22424  */
22425  __Pyx_TraceLine(210,0,__PYX_ERR(1, 210, __pyx_L1_error))
22426  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 210, __pyx_L1_error)
22427  __Pyx_GOTREF(__pyx_t_1);
22428  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 210, __pyx_L1_error)
22429  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22430  PyType_Modified(__pyx_array_type);
22431 
22432  /* "View.MemoryView":227
22433  *
22434  * @cname('get_memview')
22435  * cdef get_memview(self): # <<<<<<<<<<<<<<
22436  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
22437  * return memoryview(self, flags, self.dtype_is_object)
22438  */
22439  __Pyx_TraceLine(227,0,__PYX_ERR(1, 227, __pyx_L1_error))
22440 
22441 
22442  /* "View.MemoryView":245
22443  *
22444  * @cname("__pyx_array_new")
22445  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
22446  * char *mode, char *buf):
22447  * cdef array result
22448  */
22449  __Pyx_TraceLine(245,0,__PYX_ERR(1, 245, __pyx_L1_error))
22450 
22451 
22452  /* "View.MemoryView":287
22453  * return self.name
22454  *
22455  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
22456  * cdef strided = Enum("<strided and direct>") # default
22457  * cdef indirect = Enum("<strided and indirect>")
22458  */
22459  __Pyx_TraceLine(287,0,__PYX_ERR(1, 287, __pyx_L1_error))
22460  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error)
22461  __Pyx_GOTREF(__pyx_t_1);
22462  __Pyx_XGOTREF(generic);
22463  __Pyx_DECREF_SET(generic, __pyx_t_1);
22464  __Pyx_GIVEREF(__pyx_t_1);
22465  __pyx_t_1 = 0;
22466 
22467  /* "View.MemoryView":288
22468  *
22469  * cdef generic = Enum("<strided and direct or indirect>")
22470  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
22471  * cdef indirect = Enum("<strided and indirect>")
22472  *
22473  */
22474  __Pyx_TraceLine(288,0,__PYX_ERR(1, 288, __pyx_L1_error))
22475  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 288, __pyx_L1_error)
22476  __Pyx_GOTREF(__pyx_t_1);
22477  __Pyx_XGOTREF(strided);
22478  __Pyx_DECREF_SET(strided, __pyx_t_1);
22479  __Pyx_GIVEREF(__pyx_t_1);
22480  __pyx_t_1 = 0;
22481 
22482  /* "View.MemoryView":289
22483  * cdef generic = Enum("<strided and direct or indirect>")
22484  * cdef strided = Enum("<strided and direct>") # default
22485  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
22486  *
22487  *
22488  */
22489  __Pyx_TraceLine(289,0,__PYX_ERR(1, 289, __pyx_L1_error))
22490  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error)
22491  __Pyx_GOTREF(__pyx_t_1);
22492  __Pyx_XGOTREF(indirect);
22493  __Pyx_DECREF_SET(indirect, __pyx_t_1);
22494  __Pyx_GIVEREF(__pyx_t_1);
22495  __pyx_t_1 = 0;
22496 
22497  /* "View.MemoryView":292
22498  *
22499  *
22500  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
22501  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
22502  *
22503  */
22504  __Pyx_TraceLine(292,0,__PYX_ERR(1, 292, __pyx_L1_error))
22505  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 292, __pyx_L1_error)
22506  __Pyx_GOTREF(__pyx_t_1);
22507  __Pyx_XGOTREF(contiguous);
22508  __Pyx_DECREF_SET(contiguous, __pyx_t_1);
22509  __Pyx_GIVEREF(__pyx_t_1);
22510  __pyx_t_1 = 0;
22511 
22512  /* "View.MemoryView":293
22513  *
22514  * cdef contiguous = Enum("<contiguous and direct>")
22515  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
22516  *
22517  *
22518  */
22519  __Pyx_TraceLine(293,0,__PYX_ERR(1, 293, __pyx_L1_error))
22520  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 293, __pyx_L1_error)
22521  __Pyx_GOTREF(__pyx_t_1);
22522  __Pyx_XGOTREF(indirect_contiguous);
22523  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1);
22524  __Pyx_GIVEREF(__pyx_t_1);
22525  __pyx_t_1 = 0;
22526 
22527  /* "View.MemoryView":299
22528  *
22529  * @cname('__pyx_align_pointer')
22530  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
22531  * "Align pointer memory on a given boundary"
22532  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
22533  */
22534  __Pyx_TraceLine(299,0,__PYX_ERR(1, 299, __pyx_L1_error))
22535 
22536 
22537  /* "View.MemoryView":317
22538  *
22539  * DEF THREAD_LOCKS_PREALLOCATED = 8
22540  * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<<
22541  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
22542  * PyThread_allocate_lock(),
22543  */
22544  __Pyx_TraceLine(317,0,__PYX_ERR(1, 317, __pyx_L1_error))
22545  __pyx_memoryview_thread_locks_used = 0;
22546 
22547  /* "View.MemoryView":318
22548  * DEF THREAD_LOCKS_PREALLOCATED = 8
22549  * cdef int __pyx_memoryview_thread_locks_used = 0
22550  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<<
22551  * PyThread_allocate_lock(),
22552  * PyThread_allocate_lock(),
22553  */
22554  __Pyx_TraceLine(318,0,__PYX_ERR(1, 318, __pyx_L1_error))
22555  __pyx_t_2[0] = PyThread_allocate_lock();
22556  __pyx_t_2[1] = PyThread_allocate_lock();
22557  __pyx_t_2[2] = PyThread_allocate_lock();
22558  __pyx_t_2[3] = PyThread_allocate_lock();
22559  __pyx_t_2[4] = PyThread_allocate_lock();
22560  __pyx_t_2[5] = PyThread_allocate_lock();
22561  __pyx_t_2[6] = PyThread_allocate_lock();
22562  __pyx_t_2[7] = PyThread_allocate_lock();
22563  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_2, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
22564 
22565  /* "View.MemoryView":395
22566  * PyThread_free_lock(self.lock)
22567  *
22568  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
22569  * cdef Py_ssize_t dim
22570  * cdef char *itemp = <char *> self.view.buf
22571  */
22572  __Pyx_TraceLine(395,0,__PYX_ERR(1, 395, __pyx_L1_error))
22573 
22574 
22575  /* "View.MemoryView":433
22576  * self.setitem_indexed(index, value)
22577  *
22578  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
22579  * if not isinstance(obj, memoryview):
22580  * try:
22581  */
22582  __Pyx_TraceLine(433,0,__PYX_ERR(1, 433, __pyx_L1_error))
22583 
22584 
22585  /* "View.MemoryView":443
22586  * return obj
22587  *
22588  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
22589  * cdef __Pyx_memviewslice dst_slice
22590  * cdef __Pyx_memviewslice src_slice
22591  */
22592  __Pyx_TraceLine(443,0,__PYX_ERR(1, 443, __pyx_L1_error))
22593 
22594 
22595  /* "View.MemoryView":451
22596  * src.ndim, dst.ndim, self.dtype_is_object)
22597  *
22598  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
22599  * cdef int array[128]
22600  * cdef void *tmp = NULL
22601  */
22602  __Pyx_TraceLine(451,0,__PYX_ERR(1, 451, __pyx_L1_error))
22603 
22604 
22605  /* "View.MemoryView":483
22606  * PyMem_Free(tmp)
22607  *
22608  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
22609  * cdef char *itemp = self.get_item_pointer(index)
22610  * self.assign_item_from_object(itemp, value)
22611  */
22612  __Pyx_TraceLine(483,0,__PYX_ERR(1, 483, __pyx_L1_error))
22613 
22614 
22615  /* "View.MemoryView":487
22616  * self.assign_item_from_object(itemp, value)
22617  *
22618  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
22619  * """Only used if instantiated manually by the user, or if Cython doesn't
22620  * know how to convert the type"""
22621  */
22622  __Pyx_TraceLine(487,0,__PYX_ERR(1, 487, __pyx_L1_error))
22623 
22624 
22625  /* "View.MemoryView":503
22626  * return result
22627  *
22628  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
22629  * """Only used if instantiated manually by the user, or if Cython doesn't
22630  * know how to convert the type"""
22631  */
22632  __Pyx_TraceLine(503,0,__PYX_ERR(1, 503, __pyx_L1_error))
22633 
22634 
22635  /* "View.MemoryView":551
22636  * info.obj = self
22637  *
22638  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
22639  *
22640  *
22641  */
22642  __Pyx_TraceLine(551,0,__PYX_ERR(1, 551, __pyx_L1_error))
22643  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 551, __pyx_L1_error)
22644  __Pyx_GOTREF(__pyx_t_1);
22645  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 551, __pyx_L1_error)
22646  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22647  PyType_Modified(__pyx_memoryview_type);
22648 
22649  /* "View.MemoryView":659
22650  *
22651  * @cname('__pyx_memoryview_new')
22652  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
22653  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
22654  * result.typeinfo = typeinfo
22655  */
22656  __Pyx_TraceLine(659,0,__PYX_ERR(1, 659, __pyx_L1_error))
22657 
22658 
22659  /* "View.MemoryView":665
22660  *
22661  * @cname('__pyx_memoryview_check')
22662  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
22663  * return isinstance(o, memoryview)
22664  *
22665  */
22666  __Pyx_TraceLine(665,0,__PYX_ERR(1, 665, __pyx_L1_error))
22667 
22668 
22669  /* "View.MemoryView":668
22670  * return isinstance(o, memoryview)
22671  *
22672  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
22673  * """
22674  * Replace all ellipses with full slices and fill incomplete indices with
22675  */
22676  __Pyx_TraceLine(668,0,__PYX_ERR(1, 668, __pyx_L1_error))
22677 
22678 
22679  /* "View.MemoryView":702
22680  * return have_slices or nslices, tuple(result)
22681  *
22682  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
22683  * for suboffset in suboffsets[:ndim]:
22684  * if suboffset >= 0:
22685  */
22686  __Pyx_TraceLine(702,0,__PYX_ERR(1, 702, __pyx_L1_error))
22687 
22688 
22689  /* "View.MemoryView":712
22690  *
22691  * @cname('__pyx_memview_slice')
22692  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
22693  * cdef int new_ndim = 0, suboffset_dim = -1, dim
22694  * cdef bint negative_step
22695  */
22696  __Pyx_TraceLine(712,0,__PYX_ERR(1, 712, __pyx_L1_error))
22697 
22698 
22699  /* "View.MemoryView":809
22700  *
22701  * @cname('__pyx_memoryview_slice_memviewslice')
22702  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
22703  * __Pyx_memviewslice *dst,
22704  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
22705  */
22706  __Pyx_TraceLine(809,0,__PYX_ERR(1, 809, __pyx_L1_error))
22707 
22708 
22709  /* "View.MemoryView":912
22710  *
22711  * @cname('__pyx_pybuffer_index')
22712  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
22713  * Py_ssize_t dim) except NULL:
22714  * cdef Py_ssize_t shape, stride, suboffset = -1
22715  */
22716  __Pyx_TraceLine(912,0,__PYX_ERR(1, 912, __pyx_L1_error))
22717 
22718 
22719  /* "View.MemoryView":945
22720  *
22721  * @cname('__pyx_memslice_transpose')
22722  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
22723  * cdef int ndim = memslice.memview.view.ndim
22724  *
22725  */
22726  __Pyx_TraceLine(945,0,__PYX_ERR(1, 945, __pyx_L1_error))
22727 
22728 
22729  /* "View.MemoryView":981
22730  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
22731  *
22732  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
22733  * if self.to_object_func != NULL:
22734  * return self.to_object_func(itemp)
22735  */
22736  __Pyx_TraceLine(981,0,__PYX_ERR(1, 981, __pyx_L1_error))
22737 
22738 
22739  /* "View.MemoryView":987
22740  * return memoryview.convert_item_to_object(self, itemp)
22741  *
22742  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
22743  * if self.to_dtype_func != NULL:
22744  * self.to_dtype_func(itemp, value)
22745  */
22746  __Pyx_TraceLine(987,0,__PYX_ERR(1, 987, __pyx_L1_error))
22747 
22748 
22749  /* "View.MemoryView":997
22750  * return self.from_object
22751  *
22752  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
22753  *
22754  *
22755  */
22756  __Pyx_TraceLine(997,0,__PYX_ERR(1, 997, __pyx_L1_error))
22757  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 997, __pyx_L1_error)
22758  __Pyx_GOTREF(__pyx_t_1);
22759  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 997, __pyx_L1_error)
22760  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22761  PyType_Modified(__pyx_memoryviewslice_type);
22762 
22763  /* "View.MemoryView":1001
22764  *
22765  * @cname('__pyx_memoryview_fromslice')
22766  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
22767  * int ndim,
22768  * object (*to_object_func)(char *),
22769  */
22770  __Pyx_TraceLine(1001,0,__PYX_ERR(1, 1001, __pyx_L1_error))
22771 
22772 
22773  /* "View.MemoryView":1054
22774  *
22775  * @cname('__pyx_memoryview_get_slice_from_memoryview')
22776  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
22777  * __Pyx_memviewslice *mslice) except NULL:
22778  * cdef _memoryviewslice obj
22779  */
22780  __Pyx_TraceLine(1054,0,__PYX_ERR(1, 1054, __pyx_L1_error))
22781 
22782 
22783  /* "View.MemoryView":1065
22784  *
22785  * @cname('__pyx_memoryview_slice_copy')
22786  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
22787  * cdef int dim
22788  * cdef (Py_ssize_t*) shape, strides, suboffsets
22789  */
22790  __Pyx_TraceLine(1065,0,__PYX_ERR(1, 1065, __pyx_L1_error))
22791 
22792 
22793  /* "View.MemoryView":1082
22794  *
22795  * @cname('__pyx_memoryview_copy_object')
22796  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
22797  * "Create a new memoryview object"
22798  * cdef __Pyx_memviewslice memviewslice
22799  */
22800  __Pyx_TraceLine(1082,0,__PYX_ERR(1, 1082, __pyx_L1_error))
22801 
22802 
22803  /* "View.MemoryView":1089
22804  *
22805  * @cname('__pyx_memoryview_copy_object_from_slice')
22806  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
22807  * """
22808  * Create a new memoryview object from a given memoryview object and slice.
22809  */
22810  __Pyx_TraceLine(1089,0,__PYX_ERR(1, 1089, __pyx_L1_error))
22811 
22812 
22813  /* "View.MemoryView":1111
22814  *
22815  *
22816  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
22817  * if arg < 0:
22818  * return -arg
22819  */
22820  __Pyx_TraceLine(1111,0,__PYX_ERR(1, 1111, __pyx_L1_error))
22821 
22822 
22823  /* "View.MemoryView":1118
22824  *
22825  * @cname('__pyx_get_best_slice_order')
22826  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
22827  * """
22828  * Figure out the best memory access order for a given slice.
22829  */
22830  __Pyx_TraceLine(1118,0,__PYX_ERR(1, 1118, __pyx_L1_error))
22831 
22832 
22833  /* "View.MemoryView":1172
22834  * dst_data += dst_stride
22835  *
22836  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
22837  * __Pyx_memviewslice *dst,
22838  * int ndim, size_t itemsize) nogil:
22839  */
22840  __Pyx_TraceLine(1172,0,__PYX_ERR(1, 1172, __pyx_L1_error))
22841 
22842 
22843  /* "View.MemoryView":1179
22844  *
22845  * @cname('__pyx_memoryview_slice_get_size')
22846  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
22847  * "Return the size of the memory occupied by the slice in number of bytes"
22848  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
22849  */
22850  __Pyx_TraceLine(1179,0,__PYX_ERR(1, 1179, __pyx_L1_error))
22851 
22852 
22853  /* "View.MemoryView":1189
22854  *
22855  * @cname('__pyx_fill_contig_strides_array')
22856  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
22857  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
22858  * int ndim, char order) nogil:
22859  */
22860  __Pyx_TraceLine(1189,0,__PYX_ERR(1, 1189, __pyx_L1_error))
22861 
22862 
22863  /* "View.MemoryView":1210
22864  *
22865  * @cname('__pyx_memoryview_copy_data_to_temp')
22866  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
22867  * __Pyx_memviewslice *tmpslice,
22868  * char order,
22869  */
22870  __Pyx_TraceLine(1210,0,__PYX_ERR(1, 1210, __pyx_L1_error))
22871 
22872 
22873  /* "View.MemoryView":1253
22874  *
22875  * @cname('__pyx_memoryview_err_extents')
22876  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
22877  * Py_ssize_t extent2) except -1 with gil:
22878  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
22879  */
22880  __Pyx_TraceLine(1253,0,__PYX_ERR(1, 1253, __pyx_L1_error))
22881 
22882 
22883  /* "View.MemoryView":1259
22884  *
22885  * @cname('__pyx_memoryview_err_dim')
22886  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
22887  * raise error(msg.decode('ascii') % dim)
22888  *
22889  */
22890  __Pyx_TraceLine(1259,0,__PYX_ERR(1, 1259, __pyx_L1_error))
22891 
22892 
22893  /* "View.MemoryView":1263
22894  *
22895  * @cname('__pyx_memoryview_err')
22896  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
22897  * if msg != NULL:
22898  * raise error(msg.decode('ascii'))
22899  */
22900  __Pyx_TraceLine(1263,0,__PYX_ERR(1, 1263, __pyx_L1_error))
22901 
22902 
22903  /* "View.MemoryView":1270
22904  *
22905  * @cname('__pyx_memoryview_copy_contents')
22906  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
22907  * __Pyx_memviewslice dst,
22908  * int src_ndim, int dst_ndim,
22909  */
22910  __Pyx_TraceLine(1270,0,__PYX_ERR(1, 1270, __pyx_L1_error))
22911 
22912 
22913  /* "View.MemoryView":1342
22914  *
22915  * @cname('__pyx_memoryview_broadcast_leading')
22916  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
22917  * int ndim,
22918  * int ndim_other) nogil:
22919  */
22920  __Pyx_TraceLine(1342,0,__PYX_ERR(1, 1342, __pyx_L1_error))
22921 
22922 
22923  /* "View.MemoryView":1364
22924  *
22925  * @cname('__pyx_memoryview_refcount_copying')
22926  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
22927  * int ndim, bint inc) nogil:
22928  *
22929  */
22930  __Pyx_TraceLine(1364,0,__PYX_ERR(1, 1364, __pyx_L1_error))
22931 
22932 
22933  /* "View.MemoryView":1373
22934  *
22935  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
22936  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
22937  * Py_ssize_t *strides, int ndim,
22938  * bint inc) with gil:
22939  */
22940  __Pyx_TraceLine(1373,0,__PYX_ERR(1, 1373, __pyx_L1_error))
22941 
22942 
22943  /* "View.MemoryView":1379
22944  *
22945  * @cname('__pyx_memoryview_refcount_objects_in_slice')
22946  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
22947  * Py_ssize_t *strides, int ndim, bint inc):
22948  * cdef Py_ssize_t i
22949  */
22950  __Pyx_TraceLine(1379,0,__PYX_ERR(1, 1379, __pyx_L1_error))
22951 
22952 
22953  /* "View.MemoryView":1399
22954  *
22955  * @cname('__pyx_memoryview_slice_assign_scalar')
22956  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
22957  * size_t itemsize, void *item,
22958  * bint dtype_is_object) nogil:
22959  */
22960  __Pyx_TraceLine(1399,0,__PYX_ERR(1, 1399, __pyx_L1_error))
22961 
22962 
22963  /* "View.MemoryView":1409
22964  *
22965  * @cname('__pyx_memoryview__slice_assign_scalar')
22966  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
22967  * Py_ssize_t *strides, int ndim,
22968  * size_t itemsize, void *item) nogil:
22969  */
22970  __Pyx_TraceLine(1409,0,__PYX_ERR(1, 1409, __pyx_L1_error))
22971 
22972 
22973  /* "(tree fragment)":1
22974  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
22975  * cdef object __pyx_PickleError
22976  * cdef object __pyx_result
22977  */
22978  __Pyx_TraceLine(1,0,__PYX_ERR(1, 1, __pyx_L1_error))
22979  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
22980  __Pyx_GOTREF(__pyx_t_1);
22981  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
22982  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22983 
22984  /* "(tree fragment)":11
22985  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
22986  * return __pyx_result
22987  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
22988  * __pyx_result.name = __pyx_state[0]
22989  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
22990  */
22991  __Pyx_TraceLine(11,0,__PYX_ERR(1, 11, __pyx_L1_error))
22992 
22993  __Pyx_TraceReturn(Py_None, 0);
22994 
22995  /*--- Wrapped vars code ---*/
22996 
22997  goto __pyx_L0;
22998  __pyx_L1_error:;
22999  __Pyx_XDECREF(__pyx_t_1);
23000  if (__pyx_m) {
23001  if (__pyx_d) {
23002  __Pyx_AddTraceback("init imate._c_linear_operator.py_c_linear_operator", __pyx_clineno, __pyx_lineno, __pyx_filename);
23003  }
23004  Py_CLEAR(__pyx_m);
23005  } else if (!PyErr_Occurred()) {
23006  PyErr_SetString(PyExc_ImportError, "init imate._c_linear_operator.py_c_linear_operator");
23007  }
23008  __pyx_L0:;
23009  __Pyx_RefNannyFinishContext();
23010  #if CYTHON_PEP489_MULTI_PHASE_INIT
23011  return (__pyx_m != NULL) ? 0 : -1;
23012  #elif PY_MAJOR_VERSION >= 3
23013  return __pyx_m;
23014  #else
23015  return;
23016  #endif
23017 }
23018 
23019 /* --- Runtime support code --- */
23020 /* Refnanny */
23021 #if CYTHON_REFNANNY
23022 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
23023  PyObject *m = NULL, *p = NULL;
23024  void *r = NULL;
23025  m = PyImport_ImportModule(modname);
23026  if (!m) goto end;
23027  p = PyObject_GetAttrString(m, "RefNannyAPI");
23028  if (!p) goto end;
23029  r = PyLong_AsVoidPtr(p);
23030 end:
23031  Py_XDECREF(p);
23032  Py_XDECREF(m);
23033  return (__Pyx_RefNannyAPIStruct *)r;
23034 }
23035 #endif
23036 
23037 /* PyObjectGetAttrStr */
23038 #if CYTHON_USE_TYPE_SLOTS
23039 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
23040  PyTypeObject* tp = Py_TYPE(obj);
23041  if (likely(tp->tp_getattro))
23042  return tp->tp_getattro(obj, attr_name);
23043 #if PY_MAJOR_VERSION < 3
23044  if (likely(tp->tp_getattr))
23045  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
23046 #endif
23047  return PyObject_GetAttr(obj, attr_name);
23048 }
23049 #endif
23050 
23051 /* GetBuiltinName */
23052 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
23053  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
23054  if (unlikely(!result)) {
23055  PyErr_Format(PyExc_NameError,
23056 #if PY_MAJOR_VERSION >= 3
23057  "name '%U' is not defined", name);
23058 #else
23059  "name '%.200s' is not defined", PyString_AS_STRING(name));
23060 #endif
23061  }
23062  return result;
23063 }
23064 
23065 /* RaiseArgTupleInvalid */
23066 static void __Pyx_RaiseArgtupleInvalid(
23067  const char* func_name,
23068  int exact,
23069  Py_ssize_t num_min,
23070  Py_ssize_t num_max,
23071  Py_ssize_t num_found)
23072 {
23073  Py_ssize_t num_expected;
23074  const char *more_or_less;
23075  if (num_found < num_min) {
23076  num_expected = num_min;
23077  more_or_less = "at least";
23078  } else {
23079  num_expected = num_max;
23080  more_or_less = "at most";
23081  }
23082  if (exact) {
23083  more_or_less = "exactly";
23084  }
23085  PyErr_Format(PyExc_TypeError,
23086  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
23087  func_name, more_or_less, num_expected,
23088  (num_expected == 1) ? "" : "s", num_found);
23089 }
23090 
23091 /* KeywordStringCheck */
23092 static int __Pyx_CheckKeywordStrings(
23093  PyObject *kwdict,
23094  const char* function_name,
23095  int kw_allowed)
23096 {
23097  PyObject* key = 0;
23098  Py_ssize_t pos = 0;
23099 #if CYTHON_COMPILING_IN_PYPY
23100  if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
23101  goto invalid_keyword;
23102  return 1;
23103 #else
23104  while (PyDict_Next(kwdict, &pos, &key, 0)) {
23105  #if PY_MAJOR_VERSION < 3
23106  if (unlikely(!PyString_Check(key)))
23107  #endif
23108  if (unlikely(!PyUnicode_Check(key)))
23109  goto invalid_keyword_type;
23110  }
23111  if ((!kw_allowed) && unlikely(key))
23112  goto invalid_keyword;
23113  return 1;
23114 invalid_keyword_type:
23115  PyErr_Format(PyExc_TypeError,
23116  "%.200s() keywords must be strings", function_name);
23117  return 0;
23118 #endif
23119 invalid_keyword:
23120  PyErr_Format(PyExc_TypeError,
23121  #if PY_MAJOR_VERSION < 3
23122  "%.200s() got an unexpected keyword argument '%.200s'",
23123  function_name, PyString_AsString(key));
23124  #else
23125  "%s() got an unexpected keyword argument '%U'",
23126  function_name, key);
23127  #endif
23128  return 0;
23129 }
23130 
23131 /* PyErrFetchRestore */
23132 #if CYTHON_FAST_THREAD_STATE
23133 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
23134  PyObject *tmp_type, *tmp_value, *tmp_tb;
23135  tmp_type = tstate->curexc_type;
23136  tmp_value = tstate->curexc_value;
23137  tmp_tb = tstate->curexc_traceback;
23138  tstate->curexc_type = type;
23139  tstate->curexc_value = value;
23140  tstate->curexc_traceback = tb;
23141  Py_XDECREF(tmp_type);
23142  Py_XDECREF(tmp_value);
23143  Py_XDECREF(tmp_tb);
23144 }
23145 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
23146  *type = tstate->curexc_type;
23147  *value = tstate->curexc_value;
23148  *tb = tstate->curexc_traceback;
23149  tstate->curexc_type = 0;
23150  tstate->curexc_value = 0;
23151  tstate->curexc_traceback = 0;
23152 }
23153 #endif
23154 
23155 /* Profile */
23156 #if CYTHON_PROFILE
23157 static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
23158  PyFrameObject** frame,
23159  PyThreadState* tstate,
23160  const char *funcname,
23161  const char *srcfile,
23162  int firstlineno) {
23163  PyObject *type, *value, *traceback;
23164  int retval;
23165  if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
23166  if (*code == NULL) {
23167  *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
23168  if (*code == NULL) return 0;
23169  }
23170  *frame = PyFrame_New(
23171  tstate, /*PyThreadState *tstate*/
23172  *code, /*PyCodeObject *code*/
23173  __pyx_d, /*PyObject *globals*/
23174  0 /*PyObject *locals*/
23175  );
23176  if (*frame == NULL) return 0;
23177  if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
23178  Py_INCREF(Py_None);
23179  (*frame)->f_trace = Py_None;
23180  }
23181 #if PY_VERSION_HEX < 0x030400B1
23182  } else {
23183  (*frame)->f_tstate = tstate;
23184 #endif
23185  }
23186  __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
23187  retval = 1;
23188  __Pyx_EnterTracing(tstate);
23189  __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
23190  #if CYTHON_TRACE
23191  if (tstate->c_tracefunc)
23192  retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
23193  if (retval && tstate->c_profilefunc)
23194  #endif
23195  retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
23196  __Pyx_LeaveTracing(tstate);
23197  if (retval) {
23198  __Pyx_ErrRestoreInState(tstate, type, value, traceback);
23199  return __Pyx_IsTracing(tstate, 0, 0) && retval;
23200  } else {
23201  Py_XDECREF(type);
23202  Py_XDECREF(value);
23203  Py_XDECREF(traceback);
23204  return -1;
23205  }
23206 }
23207 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
23208  PyCodeObject *py_code = 0;
23209 #if PY_MAJOR_VERSION >= 3
23210  py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
23211  if (likely(py_code)) {
23212  py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
23213  }
23214 #else
23215  PyObject *py_srcfile = 0;
23216  PyObject *py_funcname = 0;
23217  py_funcname = PyString_FromString(funcname);
23218  if (unlikely(!py_funcname)) goto bad;
23219  py_srcfile = PyString_FromString(srcfile);
23220  if (unlikely(!py_srcfile)) goto bad;
23221  py_code = PyCode_New(
23222  0,
23223  0,
23224  0,
23225  CO_OPTIMIZED | CO_NEWLOCALS,
23226  __pyx_empty_bytes, /*PyObject *code,*/
23227  __pyx_empty_tuple, /*PyObject *consts,*/
23228  __pyx_empty_tuple, /*PyObject *names,*/
23229  __pyx_empty_tuple, /*PyObject *varnames,*/
23230  __pyx_empty_tuple, /*PyObject *freevars,*/
23231  __pyx_empty_tuple, /*PyObject *cellvars,*/
23232  py_srcfile, /*PyObject *filename,*/
23233  py_funcname, /*PyObject *name,*/
23234  firstlineno,
23235  __pyx_empty_bytes /*PyObject *lnotab*/
23236  );
23237 bad:
23238  Py_XDECREF(py_srcfile);
23239  Py_XDECREF(py_funcname);
23240 #endif
23241  return py_code;
23242 }
23243 #endif
23244 
23245 /* PyObjectCall */
23246 #if CYTHON_COMPILING_IN_CPYTHON
23247 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
23248  PyObject *result;
23249  ternaryfunc call = Py_TYPE(func)->tp_call;
23250  if (unlikely(!call))
23251  return PyObject_Call(func, arg, kw);
23252  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
23253  return NULL;
23254  result = (*call)(func, arg, kw);
23255  Py_LeaveRecursiveCall();
23256  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
23257  PyErr_SetString(
23258  PyExc_SystemError,
23259  "NULL result without error in PyObject_Call");
23260  }
23261  return result;
23262 }
23263 #endif
23264 
23265 /* RaiseException */
23266 #if PY_MAJOR_VERSION < 3
23267 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
23268  CYTHON_UNUSED PyObject *cause) {
23269  __Pyx_PyThreadState_declare
23270  Py_XINCREF(type);
23271  if (!value || value == Py_None)
23272  value = NULL;
23273  else
23274  Py_INCREF(value);
23275  if (!tb || tb == Py_None)
23276  tb = NULL;
23277  else {
23278  Py_INCREF(tb);
23279  if (!PyTraceBack_Check(tb)) {
23280  PyErr_SetString(PyExc_TypeError,
23281  "raise: arg 3 must be a traceback or None");
23282  goto raise_error;
23283  }
23284  }
23285  if (PyType_Check(type)) {
23286 #if CYTHON_COMPILING_IN_PYPY
23287  if (!value) {
23288  Py_INCREF(Py_None);
23289  value = Py_None;
23290  }
23291 #endif
23292  PyErr_NormalizeException(&type, &value, &tb);
23293  } else {
23294  if (value) {
23295  PyErr_SetString(PyExc_TypeError,
23296  "instance exception may not have a separate value");
23297  goto raise_error;
23298  }
23299  value = type;
23300  type = (PyObject*) Py_TYPE(type);
23301  Py_INCREF(type);
23302  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
23303  PyErr_SetString(PyExc_TypeError,
23304  "raise: exception class must be a subclass of BaseException");
23305  goto raise_error;
23306  }
23307  }
23308  __Pyx_PyThreadState_assign
23309  __Pyx_ErrRestore(type, value, tb);
23310  return;
23311 raise_error:
23312  Py_XDECREF(value);
23313  Py_XDECREF(type);
23314  Py_XDECREF(tb);
23315  return;
23316 }
23317 #else
23318 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
23319  PyObject* owned_instance = NULL;
23320  if (tb == Py_None) {
23321  tb = 0;
23322  } else if (tb && !PyTraceBack_Check(tb)) {
23323  PyErr_SetString(PyExc_TypeError,
23324  "raise: arg 3 must be a traceback or None");
23325  goto bad;
23326  }
23327  if (value == Py_None)
23328  value = 0;
23329  if (PyExceptionInstance_Check(type)) {
23330  if (value) {
23331  PyErr_SetString(PyExc_TypeError,
23332  "instance exception may not have a separate value");
23333  goto bad;
23334  }
23335  value = type;
23336  type = (PyObject*) Py_TYPE(value);
23337  } else if (PyExceptionClass_Check(type)) {
23338  PyObject *instance_class = NULL;
23339  if (value && PyExceptionInstance_Check(value)) {
23340  instance_class = (PyObject*) Py_TYPE(value);
23341  if (instance_class != type) {
23342  int is_subclass = PyObject_IsSubclass(instance_class, type);
23343  if (!is_subclass) {
23344  instance_class = NULL;
23345  } else if (unlikely(is_subclass == -1)) {
23346  goto bad;
23347  } else {
23348  type = instance_class;
23349  }
23350  }
23351  }
23352  if (!instance_class) {
23353  PyObject *args;
23354  if (!value)
23355  args = PyTuple_New(0);
23356  else if (PyTuple_Check(value)) {
23357  Py_INCREF(value);
23358  args = value;
23359  } else
23360  args = PyTuple_Pack(1, value);
23361  if (!args)
23362  goto bad;
23363  owned_instance = PyObject_Call(type, args, NULL);
23364  Py_DECREF(args);
23365  if (!owned_instance)
23366  goto bad;
23367  value = owned_instance;
23368  if (!PyExceptionInstance_Check(value)) {
23369  PyErr_Format(PyExc_TypeError,
23370  "calling %R should have returned an instance of "
23371  "BaseException, not %R",
23372  type, Py_TYPE(value));
23373  goto bad;
23374  }
23375  }
23376  } else {
23377  PyErr_SetString(PyExc_TypeError,
23378  "raise: exception class must be a subclass of BaseException");
23379  goto bad;
23380  }
23381  if (cause) {
23382  PyObject *fixed_cause;
23383  if (cause == Py_None) {
23384  fixed_cause = NULL;
23385  } else if (PyExceptionClass_Check(cause)) {
23386  fixed_cause = PyObject_CallObject(cause, NULL);
23387  if (fixed_cause == NULL)
23388  goto bad;
23389  } else if (PyExceptionInstance_Check(cause)) {
23390  fixed_cause = cause;
23391  Py_INCREF(fixed_cause);
23392  } else {
23393  PyErr_SetString(PyExc_TypeError,
23394  "exception causes must derive from "
23395  "BaseException");
23396  goto bad;
23397  }
23398  PyException_SetCause(value, fixed_cause);
23399  }
23400  PyErr_SetObject(type, value);
23401  if (tb) {
23402 #if CYTHON_FAST_THREAD_STATE
23403  PyThreadState *tstate = __Pyx_PyThreadState_Current;
23404  PyObject* tmp_tb = tstate->curexc_traceback;
23405  if (tb != tmp_tb) {
23406  Py_INCREF(tb);
23407  tstate->curexc_traceback = tb;
23408  Py_XDECREF(tmp_tb);
23409  }
23410 #else
23411  PyObject *tmp_type, *tmp_value, *tmp_tb;
23412  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
23413  Py_INCREF(tb);
23414  PyErr_Restore(tmp_type, tmp_value, tb);
23415  Py_XDECREF(tmp_tb);
23416 #endif
23417  }
23418 bad:
23419  Py_XDECREF(owned_instance);
23420  return;
23421 }
23422 #endif
23423 
23424 /* WriteUnraisableException */
23425 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
23426  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
23427  int full_traceback, CYTHON_UNUSED int nogil) {
23428  PyObject *old_exc, *old_val, *old_tb;
23429  PyObject *ctx;
23430  __Pyx_PyThreadState_declare
23431 #ifdef WITH_THREAD
23432  PyGILState_STATE state;
23433  if (nogil)
23434  state = PyGILState_Ensure();
23435  else state = (PyGILState_STATE)0;
23436 #endif
23437  __Pyx_PyThreadState_assign
23438  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
23439  if (full_traceback) {
23440  Py_XINCREF(old_exc);
23441  Py_XINCREF(old_val);
23442  Py_XINCREF(old_tb);
23443  __Pyx_ErrRestore(old_exc, old_val, old_tb);
23444  PyErr_PrintEx(1);
23445  }
23446  #if PY_MAJOR_VERSION < 3
23447  ctx = PyString_FromString(name);
23448  #else
23449  ctx = PyUnicode_FromString(name);
23450  #endif
23451  __Pyx_ErrRestore(old_exc, old_val, old_tb);
23452  if (!ctx) {
23453  PyErr_WriteUnraisable(Py_None);
23454  } else {
23455  PyErr_WriteUnraisable(ctx);
23456  Py_DECREF(ctx);
23457  }
23458 #ifdef WITH_THREAD
23459  if (nogil)
23460  PyGILState_Release(state);
23461 #endif
23462 }
23463 
23464 /* BytesEquals */
23465 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
23466 #if CYTHON_COMPILING_IN_PYPY
23467  return PyObject_RichCompareBool(s1, s2, equals);
23468 #else
23469  if (s1 == s2) {
23470  return (equals == Py_EQ);
23471  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
23472  const char *ps1, *ps2;
23473  Py_ssize_t length = PyBytes_GET_SIZE(s1);
23474  if (length != PyBytes_GET_SIZE(s2))
23475  return (equals == Py_NE);
23476  ps1 = PyBytes_AS_STRING(s1);
23477  ps2 = PyBytes_AS_STRING(s2);
23478  if (ps1[0] != ps2[0]) {
23479  return (equals == Py_NE);
23480  } else if (length == 1) {
23481  return (equals == Py_EQ);
23482  } else {
23483  int result;
23484 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
23485  Py_hash_t hash1, hash2;
23486  hash1 = ((PyBytesObject*)s1)->ob_shash;
23487  hash2 = ((PyBytesObject*)s2)->ob_shash;
23488  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
23489  return (equals == Py_NE);
23490  }
23491 #endif
23492  result = memcmp(ps1, ps2, (size_t)length);
23493  return (equals == Py_EQ) ? (result == 0) : (result != 0);
23494  }
23495  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
23496  return (equals == Py_NE);
23497  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
23498  return (equals == Py_NE);
23499  } else {
23500  int result;
23501  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
23502  if (!py_result)
23503  return -1;
23504  result = __Pyx_PyObject_IsTrue(py_result);
23505  Py_DECREF(py_result);
23506  return result;
23507  }
23508 #endif
23509 }
23510 
23511 /* PyCFunctionFastCall */
23512 #if CYTHON_FAST_PYCCALL
23513 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
23514  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
23515  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
23516  PyObject *self = PyCFunction_GET_SELF(func);
23517  int flags = PyCFunction_GET_FLAGS(func);
23518  assert(PyCFunction_Check(func));
23519  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
23520  assert(nargs >= 0);
23521  assert(nargs == 0 || args != NULL);
23522  /* _PyCFunction_FastCallDict() must not be called with an exception set,
23523  because it may clear it (directly or indirectly) and so the
23524  caller loses its exception */
23525  assert(!PyErr_Occurred());
23526  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
23527  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
23528  } else {
23529  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
23530  }
23531 }
23532 #endif
23533 
23534 /* PyFunctionFastCall */
23535 #if CYTHON_FAST_PYCALL
23536 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
23537  PyObject *globals) {
23538  PyFrameObject *f;
23539  PyThreadState *tstate = __Pyx_PyThreadState_Current;
23540  PyObject **fastlocals;
23541  Py_ssize_t i;
23542  PyObject *result;
23543  assert(globals != NULL);
23544  /* XXX Perhaps we should create a specialized
23545  PyFrame_New() that doesn't take locals, but does
23546  take builtins without sanity checking them.
23547  */
23548  assert(tstate != NULL);
23549  f = PyFrame_New(tstate, co, globals, NULL);
23550  if (f == NULL) {
23551  return NULL;
23552  }
23553  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
23554  for (i = 0; i < na; i++) {
23555  Py_INCREF(*args);
23556  fastlocals[i] = *args++;
23557  }
23558  result = PyEval_EvalFrameEx(f,0);
23559  ++tstate->recursion_depth;
23560  Py_DECREF(f);
23561  --tstate->recursion_depth;
23562  return result;
23563 }
23564 #if 1 || PY_VERSION_HEX < 0x030600B1
23565 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
23566  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
23567  PyObject *globals = PyFunction_GET_GLOBALS(func);
23568  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
23569  PyObject *closure;
23570 #if PY_MAJOR_VERSION >= 3
23571  PyObject *kwdefs;
23572 #endif
23573  PyObject *kwtuple, **k;
23574  PyObject **d;
23575  Py_ssize_t nd;
23576  Py_ssize_t nk;
23577  PyObject *result;
23578  assert(kwargs == NULL || PyDict_Check(kwargs));
23579  nk = kwargs ? PyDict_Size(kwargs) : 0;
23580  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
23581  return NULL;
23582  }
23583  if (
23584 #if PY_MAJOR_VERSION >= 3
23585  co->co_kwonlyargcount == 0 &&
23586 #endif
23587  likely(kwargs == NULL || nk == 0) &&
23588  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
23589  if (argdefs == NULL && co->co_argcount == nargs) {
23590  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
23591  goto done;
23592  }
23593  else if (nargs == 0 && argdefs != NULL
23594  && co->co_argcount == Py_SIZE(argdefs)) {
23595  /* function called with no arguments, but all parameters have
23596  a default value: use default values as arguments .*/
23597  args = &PyTuple_GET_ITEM(argdefs, 0);
23598  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
23599  goto done;
23600  }
23601  }
23602  if (kwargs != NULL) {
23603  Py_ssize_t pos, i;
23604  kwtuple = PyTuple_New(2 * nk);
23605  if (kwtuple == NULL) {
23606  result = NULL;
23607  goto done;
23608  }
23609  k = &PyTuple_GET_ITEM(kwtuple, 0);
23610  pos = i = 0;
23611  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
23612  Py_INCREF(k[i]);
23613  Py_INCREF(k[i+1]);
23614  i += 2;
23615  }
23616  nk = i / 2;
23617  }
23618  else {
23619  kwtuple = NULL;
23620  k = NULL;
23621  }
23622  closure = PyFunction_GET_CLOSURE(func);
23623 #if PY_MAJOR_VERSION >= 3
23624  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
23625 #endif
23626  if (argdefs != NULL) {
23627  d = &PyTuple_GET_ITEM(argdefs, 0);
23628  nd = Py_SIZE(argdefs);
23629  }
23630  else {
23631  d = NULL;
23632  nd = 0;
23633  }
23634 #if PY_MAJOR_VERSION >= 3
23635  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
23636  args, (int)nargs,
23637  k, (int)nk,
23638  d, (int)nd, kwdefs, closure);
23639 #else
23640  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
23641  args, (int)nargs,
23642  k, (int)nk,
23643  d, (int)nd, closure);
23644 #endif
23645  Py_XDECREF(kwtuple);
23646 done:
23647  Py_LeaveRecursiveCall();
23648  return result;
23649 }
23650 #endif
23651 #endif
23652 
23653 /* PyObjectCallMethO */
23654 #if CYTHON_COMPILING_IN_CPYTHON
23655 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
23656  PyObject *self, *result;
23657  PyCFunction cfunc;
23658  cfunc = PyCFunction_GET_FUNCTION(func);
23659  self = PyCFunction_GET_SELF(func);
23660  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
23661  return NULL;
23662  result = cfunc(self, arg);
23663  Py_LeaveRecursiveCall();
23664  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
23665  PyErr_SetString(
23666  PyExc_SystemError,
23667  "NULL result without error in PyObject_Call");
23668  }
23669  return result;
23670 }
23671 #endif
23672 
23673 /* PyObjectCallOneArg */
23674 #if CYTHON_COMPILING_IN_CPYTHON
23675 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
23676  PyObject *result;
23677  PyObject *args = PyTuple_New(1);
23678  if (unlikely(!args)) return NULL;
23679  Py_INCREF(arg);
23680  PyTuple_SET_ITEM(args, 0, arg);
23681  result = __Pyx_PyObject_Call(func, args, NULL);
23682  Py_DECREF(args);
23683  return result;
23684 }
23685 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
23686 #if CYTHON_FAST_PYCALL
23687  if (PyFunction_Check(func)) {
23688  return __Pyx_PyFunction_FastCall(func, &arg, 1);
23689  }
23690 #endif
23691  if (likely(PyCFunction_Check(func))) {
23692  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
23693  return __Pyx_PyObject_CallMethO(func, arg);
23694 #if CYTHON_FAST_PYCCALL
23695  } else if (__Pyx_PyFastCFunction_Check(func)) {
23696  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
23697 #endif
23698  }
23699  }
23700  return __Pyx__PyObject_CallOneArg(func, arg);
23701 }
23702 #else
23703 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
23704  PyObject *result;
23705  PyObject *args = PyTuple_Pack(1, arg);
23706  if (unlikely(!args)) return NULL;
23707  result = __Pyx_PyObject_Call(func, args, NULL);
23708  Py_DECREF(args);
23709  return result;
23710 }
23711 #endif
23712 
23713 /* PyDictVersioning */
23714 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
23715 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
23716  PyObject *dict = Py_TYPE(obj)->tp_dict;
23717  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
23718 }
23719 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
23720  PyObject **dictptr = NULL;
23721  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
23722  if (offset) {
23723 #if CYTHON_COMPILING_IN_CPYTHON
23724  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
23725 #else
23726  dictptr = _PyObject_GetDictPtr(obj);
23727 #endif
23728  }
23729  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
23730 }
23731 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
23732  PyObject *dict = Py_TYPE(obj)->tp_dict;
23733  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
23734  return 0;
23735  return obj_dict_version == __Pyx_get_object_dict_version(obj);
23736 }
23737 #endif
23738 
23739 /* GetModuleGlobalName */
23740 #if CYTHON_USE_DICT_VERSIONS
23741 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
23742 #else
23743 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
23744 #endif
23745 {
23746  PyObject *result;
23747 #if !CYTHON_AVOID_BORROWED_REFS
23748 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
23749  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
23750  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
23751  if (likely(result)) {
23752  return __Pyx_NewRef(result);
23753  } else if (unlikely(PyErr_Occurred())) {
23754  return NULL;
23755  }
23756 #else
23757  result = PyDict_GetItem(__pyx_d, name);
23758  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
23759  if (likely(result)) {
23760  return __Pyx_NewRef(result);
23761  }
23762 #endif
23763 #else
23764  result = PyObject_GetItem(__pyx_d, name);
23765  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
23766  if (likely(result)) {
23767  return __Pyx_NewRef(result);
23768  }
23769  PyErr_Clear();
23770 #endif
23771  return __Pyx_GetBuiltinName(name);
23772 }
23773 
23774 /* PyObjectCall2Args */
23775 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
23776  PyObject *args, *result = NULL;
23777  #if CYTHON_FAST_PYCALL
23778  if (PyFunction_Check(function)) {
23779  PyObject *args[2] = {arg1, arg2};
23780  return __Pyx_PyFunction_FastCall(function, args, 2);
23781  }
23782  #endif
23783  #if CYTHON_FAST_PYCCALL
23784  if (__Pyx_PyFastCFunction_Check(function)) {
23785  PyObject *args[2] = {arg1, arg2};
23786  return __Pyx_PyCFunction_FastCall(function, args, 2);
23787  }
23788  #endif
23789  args = PyTuple_New(2);
23790  if (unlikely(!args)) goto done;
23791  Py_INCREF(arg1);
23792  PyTuple_SET_ITEM(args, 0, arg1);
23793  Py_INCREF(arg2);
23794  PyTuple_SET_ITEM(args, 1, arg2);
23795  Py_INCREF(function);
23796  result = __Pyx_PyObject_Call(function, args, NULL);
23797  Py_DECREF(args);
23798  Py_DECREF(function);
23799 done:
23800  return result;
23801 }
23802 
23803 /* UnicodeEquals */
23804 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
23805 #if CYTHON_COMPILING_IN_PYPY
23806  return PyObject_RichCompareBool(s1, s2, equals);
23807 #else
23808 #if PY_MAJOR_VERSION < 3
23809  PyObject* owned_ref = NULL;
23810 #endif
23811  int s1_is_unicode, s2_is_unicode;
23812  if (s1 == s2) {
23813  goto return_eq;
23814  }
23815  s1_is_unicode = PyUnicode_CheckExact(s1);
23816  s2_is_unicode = PyUnicode_CheckExact(s2);
23817 #if PY_MAJOR_VERSION < 3
23818  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
23819  owned_ref = PyUnicode_FromObject(s2);
23820  if (unlikely(!owned_ref))
23821  return -1;
23822  s2 = owned_ref;
23823  s2_is_unicode = 1;
23824  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
23825  owned_ref = PyUnicode_FromObject(s1);
23826  if (unlikely(!owned_ref))
23827  return -1;
23828  s1 = owned_ref;
23829  s1_is_unicode = 1;
23830  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
23831  return __Pyx_PyBytes_Equals(s1, s2, equals);
23832  }
23833 #endif
23834  if (s1_is_unicode & s2_is_unicode) {
23835  Py_ssize_t length;
23836  int kind;
23837  void *data1, *data2;
23838  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
23839  return -1;
23840  length = __Pyx_PyUnicode_GET_LENGTH(s1);
23841  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
23842  goto return_ne;
23843  }
23844 #if CYTHON_USE_UNICODE_INTERNALS
23845  {
23846  Py_hash_t hash1, hash2;
23847  #if CYTHON_PEP393_ENABLED
23848  hash1 = ((PyASCIIObject*)s1)->hash;
23849  hash2 = ((PyASCIIObject*)s2)->hash;
23850  #else
23851  hash1 = ((PyUnicodeObject*)s1)->hash;
23852  hash2 = ((PyUnicodeObject*)s2)->hash;
23853  #endif
23854  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
23855  goto return_ne;
23856  }
23857  }
23858 #endif
23859  kind = __Pyx_PyUnicode_KIND(s1);
23860  if (kind != __Pyx_PyUnicode_KIND(s2)) {
23861  goto return_ne;
23862  }
23863  data1 = __Pyx_PyUnicode_DATA(s1);
23864  data2 = __Pyx_PyUnicode_DATA(s2);
23865  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
23866  goto return_ne;
23867  } else if (length == 1) {
23868  goto return_eq;
23869  } else {
23870  int result = memcmp(data1, data2, (size_t)(length * kind));
23871  #if PY_MAJOR_VERSION < 3
23872  Py_XDECREF(owned_ref);
23873  #endif
23874  return (equals == Py_EQ) ? (result == 0) : (result != 0);
23875  }
23876  } else if ((s1 == Py_None) & s2_is_unicode) {
23877  goto return_ne;
23878  } else if ((s2 == Py_None) & s1_is_unicode) {
23879  goto return_ne;
23880  } else {
23881  int result;
23882  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
23883  #if PY_MAJOR_VERSION < 3
23884  Py_XDECREF(owned_ref);
23885  #endif
23886  if (!py_result)
23887  return -1;
23888  result = __Pyx_PyObject_IsTrue(py_result);
23889  Py_DECREF(py_result);
23890  return result;
23891  }
23892 return_eq:
23893  #if PY_MAJOR_VERSION < 3
23894  Py_XDECREF(owned_ref);
23895  #endif
23896  return (equals == Py_EQ);
23897 return_ne:
23898  #if PY_MAJOR_VERSION < 3
23899  Py_XDECREF(owned_ref);
23900  #endif
23901  return (equals == Py_NE);
23902 #endif
23903 }
23904 
23905 /* MemviewSliceInit */
23906 static int
23907 __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
23908  int ndim,
23909  __Pyx_memviewslice *memviewslice,
23910  int memview_is_new_reference)
23911 {
23912  __Pyx_RefNannyDeclarations
23913  int i, retval=-1;
23914  Py_buffer *buf = &memview->view;
23915  __Pyx_RefNannySetupContext("init_memviewslice", 0);
23916  if (unlikely(memviewslice->memview || memviewslice->data)) {
23917  PyErr_SetString(PyExc_ValueError,
23918  "memviewslice is already initialized!");
23919  goto fail;
23920  }
23921  if (buf->strides) {
23922  for (i = 0; i < ndim; i++) {
23923  memviewslice->strides[i] = buf->strides[i];
23924  }
23925  } else {
23926  Py_ssize_t stride = buf->itemsize;
23927  for (i = ndim - 1; i >= 0; i--) {
23928  memviewslice->strides[i] = stride;
23929  stride *= buf->shape[i];
23930  }
23931  }
23932  for (i = 0; i < ndim; i++) {
23933  memviewslice->shape[i] = buf->shape[i];
23934  if (buf->suboffsets) {
23935  memviewslice->suboffsets[i] = buf->suboffsets[i];
23936  } else {
23937  memviewslice->suboffsets[i] = -1;
23938  }
23939  }
23940  memviewslice->memview = memview;
23941  memviewslice->data = (char *)buf->buf;
23942  if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
23943  Py_INCREF(memview);
23944  }
23945  retval = 0;
23946  goto no_fail;
23947 fail:
23948  memviewslice->memview = 0;
23949  memviewslice->data = 0;
23950  retval = -1;
23951 no_fail:
23952  __Pyx_RefNannyFinishContext();
23953  return retval;
23954 }
23955 #ifndef Py_NO_RETURN
23956 #define Py_NO_RETURN
23957 #endif
23958 static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
23959  va_list vargs;
23960  char msg[200];
23961 #if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
23962  va_start(vargs, fmt);
23963 #else
23964  va_start(vargs);
23965 #endif
23966  vsnprintf(msg, 200, fmt, vargs);
23967  va_end(vargs);
23968  Py_FatalError(msg);
23969 }
23970 static CYTHON_INLINE int
23971 __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
23972  PyThread_type_lock lock)
23973 {
23974  int result;
23975  PyThread_acquire_lock(lock, 1);
23976  result = (*acquisition_count)++;
23977  PyThread_release_lock(lock);
23978  return result;
23979 }
23980 static CYTHON_INLINE int
23981 __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
23982  PyThread_type_lock lock)
23983 {
23984  int result;
23985  PyThread_acquire_lock(lock, 1);
23986  result = (*acquisition_count)--;
23987  PyThread_release_lock(lock);
23988  return result;
23989 }
23990 static CYTHON_INLINE void
23991 __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
23992 {
23993  int first_time;
23994  struct __pyx_memoryview_obj *memview = memslice->memview;
23995  if (unlikely(!memview || (PyObject *) memview == Py_None))
23996  return;
23997  if (unlikely(__pyx_get_slice_count(memview) < 0))
23998  __pyx_fatalerror("Acquisition count is %d (line %d)",
23999  __pyx_get_slice_count(memview), lineno);
24000  first_time = __pyx_add_acquisition_count(memview) == 0;
24001  if (unlikely(first_time)) {
24002  if (have_gil) {
24003  Py_INCREF((PyObject *) memview);
24004  } else {
24005  PyGILState_STATE _gilstate = PyGILState_Ensure();
24006  Py_INCREF((PyObject *) memview);
24007  PyGILState_Release(_gilstate);
24008  }
24009  }
24010 }
24011 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
24012  int have_gil, int lineno) {
24013  int last_time;
24014  struct __pyx_memoryview_obj *memview = memslice->memview;
24015  if (unlikely(!memview || (PyObject *) memview == Py_None)) {
24016  memslice->memview = NULL;
24017  return;
24018  }
24019  if (unlikely(__pyx_get_slice_count(memview) <= 0))
24020  __pyx_fatalerror("Acquisition count is %d (line %d)",
24021  __pyx_get_slice_count(memview), lineno);
24022  last_time = __pyx_sub_acquisition_count(memview) == 1;
24023  memslice->data = NULL;
24024  if (unlikely(last_time)) {
24025  if (have_gil) {
24026  Py_CLEAR(memslice->memview);
24027  } else {
24028  PyGILState_STATE _gilstate = PyGILState_Ensure();
24029  Py_CLEAR(memslice->memview);
24030  PyGILState_Release(_gilstate);
24031  }
24032  } else {
24033  memslice->memview = NULL;
24034  }
24035 }
24036 
24037 /* RaiseDoubleKeywords */
24038 static void __Pyx_RaiseDoubleKeywordsError(
24039  const char* func_name,
24040  PyObject* kw_name)
24041 {
24042  PyErr_Format(PyExc_TypeError,
24043  #if PY_MAJOR_VERSION >= 3
24044  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
24045  #else
24046  "%s() got multiple values for keyword argument '%s'", func_name,
24047  PyString_AsString(kw_name));
24048  #endif
24049 }
24050 
24051 /* ParseKeywords */
24052 static int __Pyx_ParseOptionalKeywords(
24053  PyObject *kwds,
24054  PyObject **argnames[],
24055  PyObject *kwds2,
24056  PyObject *values[],
24057  Py_ssize_t num_pos_args,
24058  const char* function_name)
24059 {
24060  PyObject *key = 0, *value = 0;
24061  Py_ssize_t pos = 0;
24062  PyObject*** name;
24063  PyObject*** first_kw_arg = argnames + num_pos_args;
24064  while (PyDict_Next(kwds, &pos, &key, &value)) {
24065  name = first_kw_arg;
24066  while (*name && (**name != key)) name++;
24067  if (*name) {
24068  values[name-argnames] = value;
24069  continue;
24070  }
24071  name = first_kw_arg;
24072  #if PY_MAJOR_VERSION < 3
24073  if (likely(PyString_Check(key))) {
24074  while (*name) {
24075  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
24076  && _PyString_Eq(**name, key)) {
24077  values[name-argnames] = value;
24078  break;
24079  }
24080  name++;
24081  }
24082  if (*name) continue;
24083  else {
24084  PyObject*** argname = argnames;
24085  while (argname != first_kw_arg) {
24086  if ((**argname == key) || (
24087  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
24088  && _PyString_Eq(**argname, key))) {
24089  goto arg_passed_twice;
24090  }
24091  argname++;
24092  }
24093  }
24094  } else
24095  #endif
24096  if (likely(PyUnicode_Check(key))) {
24097  while (*name) {
24098  int cmp = (**name == key) ? 0 :
24099  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
24100  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
24101  #endif
24102  PyUnicode_Compare(**name, key);
24103  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
24104  if (cmp == 0) {
24105  values[name-argnames] = value;
24106  break;
24107  }
24108  name++;
24109  }
24110  if (*name) continue;
24111  else {
24112  PyObject*** argname = argnames;
24113  while (argname != first_kw_arg) {
24114  int cmp = (**argname == key) ? 0 :
24115  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
24116  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
24117  #endif
24118  PyUnicode_Compare(**argname, key);
24119  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
24120  if (cmp == 0) goto arg_passed_twice;
24121  argname++;
24122  }
24123  }
24124  } else
24125  goto invalid_keyword_type;
24126  if (kwds2) {
24127  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
24128  } else {
24129  goto invalid_keyword;
24130  }
24131  }
24132  return 0;
24133 arg_passed_twice:
24134  __Pyx_RaiseDoubleKeywordsError(function_name, key);
24135  goto bad;
24136 invalid_keyword_type:
24137  PyErr_Format(PyExc_TypeError,
24138  "%.200s() keywords must be strings", function_name);
24139  goto bad;
24140 invalid_keyword:
24141  PyErr_Format(PyExc_TypeError,
24142  #if PY_MAJOR_VERSION < 3
24143  "%.200s() got an unexpected keyword argument '%.200s'",
24144  function_name, PyString_AsString(key));
24145  #else
24146  "%s() got an unexpected keyword argument '%U'",
24147  function_name, key);
24148  #endif
24149 bad:
24150  return -1;
24151 }
24152 
24153 /* ArgTypeTest */
24154 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
24155 {
24156  if (unlikely(!type)) {
24157  PyErr_SetString(PyExc_SystemError, "Missing type object");
24158  return 0;
24159  }
24160  else if (exact) {
24161  #if PY_MAJOR_VERSION == 2
24162  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
24163  #endif
24164  }
24165  else {
24166  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
24167  }
24168  PyErr_Format(PyExc_TypeError,
24169  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
24170  name, type->tp_name, Py_TYPE(obj)->tp_name);
24171  return 0;
24172 }
24173 
24174 /* GetAttr */
24175 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
24176 #if CYTHON_USE_TYPE_SLOTS
24177 #if PY_MAJOR_VERSION >= 3
24178  if (likely(PyUnicode_Check(n)))
24179 #else
24180  if (likely(PyString_Check(n)))
24181 #endif
24182  return __Pyx_PyObject_GetAttrStr(o, n);
24183 #endif
24184  return PyObject_GetAttr(o, n);
24185 }
24186 
24187 /* GetItemInt */
24188 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
24189  PyObject *r;
24190  if (!j) return NULL;
24191  r = PyObject_GetItem(o, j);
24192  Py_DECREF(j);
24193  return r;
24194 }
24195 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
24196  CYTHON_NCP_UNUSED int wraparound,
24197  CYTHON_NCP_UNUSED int boundscheck) {
24198 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24199  Py_ssize_t wrapped_i = i;
24200  if (wraparound & unlikely(i < 0)) {
24201  wrapped_i += PyList_GET_SIZE(o);
24202  }
24203  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
24204  PyObject *r = PyList_GET_ITEM(o, wrapped_i);
24205  Py_INCREF(r);
24206  return r;
24207  }
24208  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
24209 #else
24210  return PySequence_GetItem(o, i);
24211 #endif
24212 }
24213 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
24214  CYTHON_NCP_UNUSED int wraparound,
24215  CYTHON_NCP_UNUSED int boundscheck) {
24216 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24217  Py_ssize_t wrapped_i = i;
24218  if (wraparound & unlikely(i < 0)) {
24219  wrapped_i += PyTuple_GET_SIZE(o);
24220  }
24221  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
24222  PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
24223  Py_INCREF(r);
24224  return r;
24225  }
24226  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
24227 #else
24228  return PySequence_GetItem(o, i);
24229 #endif
24230 }
24231 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
24232  CYTHON_NCP_UNUSED int wraparound,
24233  CYTHON_NCP_UNUSED int boundscheck) {
24234 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
24235  if (is_list || PyList_CheckExact(o)) {
24236  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
24237  if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
24238  PyObject *r = PyList_GET_ITEM(o, n);
24239  Py_INCREF(r);
24240  return r;
24241  }
24242  }
24243  else if (PyTuple_CheckExact(o)) {
24244  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
24245  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
24246  PyObject *r = PyTuple_GET_ITEM(o, n);
24247  Py_INCREF(r);
24248  return r;
24249  }
24250  } else {
24251  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
24252  if (likely(m && m->sq_item)) {
24253  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
24254  Py_ssize_t l = m->sq_length(o);
24255  if (likely(l >= 0)) {
24256  i += l;
24257  } else {
24258  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
24259  return NULL;
24260  PyErr_Clear();
24261  }
24262  }
24263  return m->sq_item(o, i);
24264  }
24265  }
24266 #else
24267  if (is_list || PySequence_Check(o)) {
24268  return PySequence_GetItem(o, i);
24269  }
24270 #endif
24271  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
24272 }
24273 
24274 /* ObjectGetItem */
24275 #if CYTHON_USE_TYPE_SLOTS
24276 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
24277  PyObject *runerr = NULL;
24278  Py_ssize_t key_value;
24279  PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
24280  if (unlikely(!(m && m->sq_item))) {
24281  PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
24282  return NULL;
24283  }
24284  key_value = __Pyx_PyIndex_AsSsize_t(index);
24285  if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
24286  return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
24287  }
24288  if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
24289  PyErr_Clear();
24290  PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
24291  }
24292  return NULL;
24293 }
24294 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
24295  PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
24296  if (likely(m && m->mp_subscript)) {
24297  return m->mp_subscript(obj, key);
24298  }
24299  return __Pyx_PyObject_GetIndex(obj, key);
24300 }
24301 #endif
24302 
24303 /* decode_c_string */
24304 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
24305  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
24306  const char* encoding, const char* errors,
24307  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
24308  Py_ssize_t length;
24309  if (unlikely((start < 0) | (stop < 0))) {
24310  size_t slen = strlen(cstring);
24311  if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
24312  PyErr_SetString(PyExc_OverflowError,
24313  "c-string too long to convert to Python");
24314  return NULL;
24315  }
24316  length = (Py_ssize_t) slen;
24317  if (start < 0) {
24318  start += length;
24319  if (start < 0)
24320  start = 0;
24321  }
24322  if (stop < 0)
24323  stop += length;
24324  }
24325  if (unlikely(stop <= start))
24326  return __Pyx_NewRef(__pyx_empty_unicode);
24327  length = stop - start;
24328  cstring += start;
24329  if (decode_func) {
24330  return decode_func(cstring, length, errors);
24331  } else {
24332  return PyUnicode_Decode(cstring, length, encoding, errors);
24333  }
24334 }
24335 
24336 /* PyErrExceptionMatches */
24337 #if CYTHON_FAST_THREAD_STATE
24338 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
24339  Py_ssize_t i, n;
24340  n = PyTuple_GET_SIZE(tuple);
24341 #if PY_MAJOR_VERSION >= 3
24342  for (i=0; i<n; i++) {
24343  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
24344  }
24345 #endif
24346  for (i=0; i<n; i++) {
24347  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
24348  }
24349  return 0;
24350 }
24351 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
24352  PyObject *exc_type = tstate->curexc_type;
24353  if (exc_type == err) return 1;
24354  if (unlikely(!exc_type)) return 0;
24355  if (unlikely(PyTuple_Check(err)))
24356  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
24357  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
24358 }
24359 #endif
24360 
24361 /* GetAttr3 */
24362 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
24363  __Pyx_PyThreadState_declare
24364  __Pyx_PyThreadState_assign
24365  if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
24366  return NULL;
24367  __Pyx_PyErr_Clear();
24368  Py_INCREF(d);
24369  return d;
24370 }
24371 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
24372  PyObject *r = __Pyx_GetAttr(o, n);
24373  return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
24374 }
24375 
24376 /* RaiseTooManyValuesToUnpack */
24377 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
24378  PyErr_Format(PyExc_ValueError,
24379  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
24380 }
24381 
24382 /* RaiseNeedMoreValuesToUnpack */
24383 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
24384  PyErr_Format(PyExc_ValueError,
24385  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
24386  index, (index == 1) ? "" : "s");
24387 }
24388 
24389 /* RaiseNoneIterError */
24390 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
24391  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
24392 }
24393 
24394 /* ExtTypeTest */
24395 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
24396  if (unlikely(!type)) {
24397  PyErr_SetString(PyExc_SystemError, "Missing type object");
24398  return 0;
24399  }
24400  if (likely(__Pyx_TypeCheck(obj, type)))
24401  return 1;
24402  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
24403  Py_TYPE(obj)->tp_name, type->tp_name);
24404  return 0;
24405 }
24406 
24407 /* GetTopmostException */
24408 #if CYTHON_USE_EXC_INFO_STACK
24409 static _PyErr_StackItem *
24410 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
24411 {
24412  _PyErr_StackItem *exc_info = tstate->exc_info;
24413  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
24414  exc_info->previous_item != NULL)
24415  {
24416  exc_info = exc_info->previous_item;
24417  }
24418  return exc_info;
24419 }
24420 #endif
24421 
24422 /* SaveResetException */
24423 #if CYTHON_FAST_THREAD_STATE
24424 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
24425  #if CYTHON_USE_EXC_INFO_STACK
24426  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
24427  *type = exc_info->exc_type;
24428  *value = exc_info->exc_value;
24429  *tb = exc_info->exc_traceback;
24430  #else
24431  *type = tstate->exc_type;
24432  *value = tstate->exc_value;
24433  *tb = tstate->exc_traceback;
24434  #endif
24435  Py_XINCREF(*type);
24436  Py_XINCREF(*value);
24437  Py_XINCREF(*tb);
24438 }
24439 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
24440  PyObject *tmp_type, *tmp_value, *tmp_tb;
24441  #if CYTHON_USE_EXC_INFO_STACK
24442  _PyErr_StackItem *exc_info = tstate->exc_info;
24443  tmp_type = exc_info->exc_type;
24444  tmp_value = exc_info->exc_value;
24445  tmp_tb = exc_info->exc_traceback;
24446  exc_info->exc_type = type;
24447  exc_info->exc_value = value;
24448  exc_info->exc_traceback = tb;
24449  #else
24450  tmp_type = tstate->exc_type;
24451  tmp_value = tstate->exc_value;
24452  tmp_tb = tstate->exc_traceback;
24453  tstate->exc_type = type;
24454  tstate->exc_value = value;
24455  tstate->exc_traceback = tb;
24456  #endif
24457  Py_XDECREF(tmp_type);
24458  Py_XDECREF(tmp_value);
24459  Py_XDECREF(tmp_tb);
24460 }
24461 #endif
24462 
24463 /* GetException */
24464 #if CYTHON_FAST_THREAD_STATE
24465 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
24466 #else
24467 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
24468 #endif
24469 {
24470  PyObject *local_type, *local_value, *local_tb;
24471 #if CYTHON_FAST_THREAD_STATE
24472  PyObject *tmp_type, *tmp_value, *tmp_tb;
24473  local_type = tstate->curexc_type;
24474  local_value = tstate->curexc_value;
24475  local_tb = tstate->curexc_traceback;
24476  tstate->curexc_type = 0;
24477  tstate->curexc_value = 0;
24478  tstate->curexc_traceback = 0;
24479 #else
24480  PyErr_Fetch(&local_type, &local_value, &local_tb);
24481 #endif
24482  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
24483 #if CYTHON_FAST_THREAD_STATE
24484  if (unlikely(tstate->curexc_type))
24485 #else
24486  if (unlikely(PyErr_Occurred()))
24487 #endif
24488  goto bad;
24489  #if PY_MAJOR_VERSION >= 3
24490  if (local_tb) {
24491  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
24492  goto bad;
24493  }
24494  #endif
24495  Py_XINCREF(local_tb);
24496  Py_XINCREF(local_type);
24497  Py_XINCREF(local_value);
24498  *type = local_type;
24499  *value = local_value;
24500  *tb = local_tb;
24501 #if CYTHON_FAST_THREAD_STATE
24502  #if CYTHON_USE_EXC_INFO_STACK
24503  {
24504  _PyErr_StackItem *exc_info = tstate->exc_info;
24505  tmp_type = exc_info->exc_type;
24506  tmp_value = exc_info->exc_value;
24507  tmp_tb = exc_info->exc_traceback;
24508  exc_info->exc_type = local_type;
24509  exc_info->exc_value = local_value;
24510  exc_info->exc_traceback = local_tb;
24511  }
24512  #else
24513  tmp_type = tstate->exc_type;
24514  tmp_value = tstate->exc_value;
24515  tmp_tb = tstate->exc_traceback;
24516  tstate->exc_type = local_type;
24517  tstate->exc_value = local_value;
24518  tstate->exc_traceback = local_tb;
24519  #endif
24520  Py_XDECREF(tmp_type);
24521  Py_XDECREF(tmp_value);
24522  Py_XDECREF(tmp_tb);
24523 #else
24524  PyErr_SetExcInfo(local_type, local_value, local_tb);
24525 #endif
24526  return 0;
24527 bad:
24528  *type = 0;
24529  *value = 0;
24530  *tb = 0;
24531  Py_XDECREF(local_type);
24532  Py_XDECREF(local_value);
24533  Py_XDECREF(local_tb);
24534  return -1;
24535 }
24536 
24537 /* SwapException */
24538 #if CYTHON_FAST_THREAD_STATE
24539 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
24540  PyObject *tmp_type, *tmp_value, *tmp_tb;
24541  #if CYTHON_USE_EXC_INFO_STACK
24542  _PyErr_StackItem *exc_info = tstate->exc_info;
24543  tmp_type = exc_info->exc_type;
24544  tmp_value = exc_info->exc_value;
24545  tmp_tb = exc_info->exc_traceback;
24546  exc_info->exc_type = *type;
24547  exc_info->exc_value = *value;
24548  exc_info->exc_traceback = *tb;
24549  #else
24550  tmp_type = tstate->exc_type;
24551  tmp_value = tstate->exc_value;
24552  tmp_tb = tstate->exc_traceback;
24553  tstate->exc_type = *type;
24554  tstate->exc_value = *value;
24555  tstate->exc_traceback = *tb;
24556  #endif
24557  *type = tmp_type;
24558  *value = tmp_value;
24559  *tb = tmp_tb;
24560 }
24561 #else
24562 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
24563  PyObject *tmp_type, *tmp_value, *tmp_tb;
24564  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
24565  PyErr_SetExcInfo(*type, *value, *tb);
24566  *type = tmp_type;
24567  *value = tmp_value;
24568  *tb = tmp_tb;
24569 }
24570 #endif
24571 
24572 /* Import */
24573 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
24574  PyObject *empty_list = 0;
24575  PyObject *module = 0;
24576  PyObject *global_dict = 0;
24577  PyObject *empty_dict = 0;
24578  PyObject *list;
24579  #if PY_MAJOR_VERSION < 3
24580  PyObject *py_import;
24581  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
24582  if (!py_import)
24583  goto bad;
24584  #endif
24585  if (from_list)
24586  list = from_list;
24587  else {
24588  empty_list = PyList_New(0);
24589  if (!empty_list)
24590  goto bad;
24591  list = empty_list;
24592  }
24593  global_dict = PyModule_GetDict(__pyx_m);
24594  if (!global_dict)
24595  goto bad;
24596  empty_dict = PyDict_New();
24597  if (!empty_dict)
24598  goto bad;
24599  {
24600  #if PY_MAJOR_VERSION >= 3
24601  if (level == -1) {
24602  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
24603  module = PyImport_ImportModuleLevelObject(
24604  name, global_dict, empty_dict, list, 1);
24605  if (!module) {
24606  if (!PyErr_ExceptionMatches(PyExc_ImportError))
24607  goto bad;
24608  PyErr_Clear();
24609  }
24610  }
24611  level = 0;
24612  }
24613  #endif
24614  if (!module) {
24615  #if PY_MAJOR_VERSION < 3
24616  PyObject *py_level = PyInt_FromLong(level);
24617  if (!py_level)
24618  goto bad;
24619  module = PyObject_CallFunctionObjArgs(py_import,
24620  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
24621  Py_DECREF(py_level);
24622  #else
24623  module = PyImport_ImportModuleLevelObject(
24624  name, global_dict, empty_dict, list, level);
24625  #endif
24626  }
24627  }
24628 bad:
24629  #if PY_MAJOR_VERSION < 3
24630  Py_XDECREF(py_import);
24631  #endif
24632  Py_XDECREF(empty_list);
24633  Py_XDECREF(empty_dict);
24634  return module;
24635 }
24636 
24637 /* FastTypeChecks */
24638 #if CYTHON_COMPILING_IN_CPYTHON
24639 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
24640  while (a) {
24641  a = a->tp_base;
24642  if (a == b)
24643  return 1;
24644  }
24645  return b == &PyBaseObject_Type;
24646 }
24647 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
24648  PyObject *mro;
24649  if (a == b) return 1;
24650  mro = a->tp_mro;
24651  if (likely(mro)) {
24652  Py_ssize_t i, n;
24653  n = PyTuple_GET_SIZE(mro);
24654  for (i = 0; i < n; i++) {
24655  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
24656  return 1;
24657  }
24658  return 0;
24659  }
24660  return __Pyx_InBases(a, b);
24661 }
24662 #if PY_MAJOR_VERSION == 2
24663 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
24664  PyObject *exception, *value, *tb;
24665  int res;
24666  __Pyx_PyThreadState_declare
24667  __Pyx_PyThreadState_assign
24668  __Pyx_ErrFetch(&exception, &value, &tb);
24669  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
24670  if (unlikely(res == -1)) {
24671  PyErr_WriteUnraisable(err);
24672  res = 0;
24673  }
24674  if (!res) {
24675  res = PyObject_IsSubclass(err, exc_type2);
24676  if (unlikely(res == -1)) {
24677  PyErr_WriteUnraisable(err);
24678  res = 0;
24679  }
24680  }
24681  __Pyx_ErrRestore(exception, value, tb);
24682  return res;
24683 }
24684 #else
24685 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
24686  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
24687  if (!res) {
24688  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
24689  }
24690  return res;
24691 }
24692 #endif
24693 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
24694  Py_ssize_t i, n;
24695  assert(PyExceptionClass_Check(exc_type));
24696  n = PyTuple_GET_SIZE(tuple);
24697 #if PY_MAJOR_VERSION >= 3
24698  for (i=0; i<n; i++) {
24699  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
24700  }
24701 #endif
24702  for (i=0; i<n; i++) {
24703  PyObject *t = PyTuple_GET_ITEM(tuple, i);
24704  #if PY_MAJOR_VERSION < 3
24705  if (likely(exc_type == t)) return 1;
24706  #endif
24707  if (likely(PyExceptionClass_Check(t))) {
24708  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
24709  } else {
24710  }
24711  }
24712  return 0;
24713 }
24714 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
24715  if (likely(err == exc_type)) return 1;
24716  if (likely(PyExceptionClass_Check(err))) {
24717  if (likely(PyExceptionClass_Check(exc_type))) {
24718  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
24719  } else if (likely(PyTuple_Check(exc_type))) {
24720  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
24721  } else {
24722  }
24723  }
24724  return PyErr_GivenExceptionMatches(err, exc_type);
24725 }
24726 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
24727  assert(PyExceptionClass_Check(exc_type1));
24728  assert(PyExceptionClass_Check(exc_type2));
24729  if (likely(err == exc_type1 || err == exc_type2)) return 1;
24730  if (likely(PyExceptionClass_Check(err))) {
24731  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
24732  }
24733  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
24734 }
24735 #endif
24736 
24737 /* PyIntBinop */
24738 #if !CYTHON_COMPILING_IN_PYPY
24739 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
24740  (void)inplace;
24741  (void)zerodivision_check;
24742  #if PY_MAJOR_VERSION < 3
24743  if (likely(PyInt_CheckExact(op1))) {
24744  const long b = intval;
24745  long x;
24746  long a = PyInt_AS_LONG(op1);
24747  x = (long)((unsigned long)a + b);
24748  if (likely((x^a) >= 0 || (x^b) >= 0))
24749  return PyInt_FromLong(x);
24750  return PyLong_Type.tp_as_number->nb_add(op1, op2);
24751  }
24752  #endif
24753  #if CYTHON_USE_PYLONG_INTERNALS
24754  if (likely(PyLong_CheckExact(op1))) {
24755  const long b = intval;
24756  long a, x;
24757 #ifdef HAVE_LONG_LONG
24758  const PY_LONG_LONG llb = intval;
24759  PY_LONG_LONG lla, llx;
24760 #endif
24761  const digit* digits = ((PyLongObject*)op1)->ob_digit;
24762  const Py_ssize_t size = Py_SIZE(op1);
24763  if (likely(__Pyx_sst_abs(size) <= 1)) {
24764  a = likely(size) ? digits[0] : 0;
24765  if (size == -1) a = -a;
24766  } else {
24767  switch (size) {
24768  case -2:
24769  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
24770  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24771  break;
24772 #ifdef HAVE_LONG_LONG
24773  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
24774  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24775  goto long_long;
24776 #endif
24777  }
24778  CYTHON_FALLTHROUGH;
24779  case 2:
24780  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
24781  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24782  break;
24783 #ifdef HAVE_LONG_LONG
24784  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
24785  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24786  goto long_long;
24787 #endif
24788  }
24789  CYTHON_FALLTHROUGH;
24790  case -3:
24791  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
24792  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24793  break;
24794 #ifdef HAVE_LONG_LONG
24795  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
24796  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24797  goto long_long;
24798 #endif
24799  }
24800  CYTHON_FALLTHROUGH;
24801  case 3:
24802  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
24803  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24804  break;
24805 #ifdef HAVE_LONG_LONG
24806  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
24807  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24808  goto long_long;
24809 #endif
24810  }
24811  CYTHON_FALLTHROUGH;
24812  case -4:
24813  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
24814  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24815  break;
24816 #ifdef HAVE_LONG_LONG
24817  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
24818  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24819  goto long_long;
24820 #endif
24821  }
24822  CYTHON_FALLTHROUGH;
24823  case 4:
24824  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
24825  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24826  break;
24827 #ifdef HAVE_LONG_LONG
24828  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
24829  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24830  goto long_long;
24831 #endif
24832  }
24833  CYTHON_FALLTHROUGH;
24834  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
24835  }
24836  }
24837  x = a + b;
24838  return PyLong_FromLong(x);
24839 #ifdef HAVE_LONG_LONG
24840  long_long:
24841  llx = lla + llb;
24842  return PyLong_FromLongLong(llx);
24843 #endif
24844 
24845 
24846  }
24847  #endif
24848  if (PyFloat_CheckExact(op1)) {
24849  const long b = intval;
24850  double a = PyFloat_AS_DOUBLE(op1);
24851  double result;
24852  PyFPE_START_PROTECT("add", return NULL)
24853  result = ((double)a) + (double)b;
24854  PyFPE_END_PROTECT(result)
24855  return PyFloat_FromDouble(result);
24856  }
24857  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
24858 }
24859 #endif
24860 
24861 /* None */
24862 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
24863  PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
24864 }
24865 
24866 /* ImportFrom */
24867 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
24868  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
24869  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
24870  PyErr_Format(PyExc_ImportError,
24871  #if PY_MAJOR_VERSION < 3
24872  "cannot import name %.230s", PyString_AS_STRING(name));
24873  #else
24874  "cannot import name %S", name);
24875  #endif
24876  }
24877  return value;
24878 }
24879 
24880 /* HasAttr */
24881 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
24882  PyObject *r;
24883  if (unlikely(!__Pyx_PyBaseString_Check(n))) {
24884  PyErr_SetString(PyExc_TypeError,
24885  "hasattr(): attribute name must be string");
24886  return -1;
24887  }
24888  r = __Pyx_GetAttr(o, n);
24889  if (unlikely(!r)) {
24890  PyErr_Clear();
24891  return 0;
24892  } else {
24893  Py_DECREF(r);
24894  return 1;
24895  }
24896 }
24897 
24898 /* PyObject_GenericGetAttrNoDict */
24899 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
24900 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
24901  PyErr_Format(PyExc_AttributeError,
24902 #if PY_MAJOR_VERSION >= 3
24903  "'%.50s' object has no attribute '%U'",
24904  tp->tp_name, attr_name);
24905 #else
24906  "'%.50s' object has no attribute '%.400s'",
24907  tp->tp_name, PyString_AS_STRING(attr_name));
24908 #endif
24909  return NULL;
24910 }
24911 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
24912  PyObject *descr;
24913  PyTypeObject *tp = Py_TYPE(obj);
24914  if (unlikely(!PyString_Check(attr_name))) {
24915  return PyObject_GenericGetAttr(obj, attr_name);
24916  }
24917  assert(!tp->tp_dictoffset);
24918  descr = _PyType_Lookup(tp, attr_name);
24919  if (unlikely(!descr)) {
24920  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
24921  }
24922  Py_INCREF(descr);
24923  #if PY_MAJOR_VERSION < 3
24924  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
24925  #endif
24926  {
24927  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
24928  if (unlikely(f)) {
24929  PyObject *res = f(descr, obj, (PyObject *)tp);
24930  Py_DECREF(descr);
24931  return res;
24932  }
24933  }
24934  return descr;
24935 }
24936 #endif
24937 
24938 /* PyObject_GenericGetAttr */
24939 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
24940 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
24941  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
24942  return PyObject_GenericGetAttr(obj, attr_name);
24943  }
24944  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
24945 }
24946 #endif
24947 
24948 /* SetVTable */
24949 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
24950 #if PY_VERSION_HEX >= 0x02070000
24951  PyObject *ob = PyCapsule_New(vtable, 0, 0);
24952 #else
24953  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
24954 #endif
24955  if (!ob)
24956  goto bad;
24957  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
24958  goto bad;
24959  Py_DECREF(ob);
24960  return 0;
24961 bad:
24962  Py_XDECREF(ob);
24963  return -1;
24964 }
24965 
24966 /* PyObjectGetAttrStrNoError */
24967 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
24968  __Pyx_PyThreadState_declare
24969  __Pyx_PyThreadState_assign
24970  if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
24971  __Pyx_PyErr_Clear();
24972 }
24973 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
24974  PyObject *result;
24975 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
24976  PyTypeObject* tp = Py_TYPE(obj);
24977  if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
24978  return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
24979  }
24980 #endif
24981  result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
24982  if (unlikely(!result)) {
24983  __Pyx_PyObject_GetAttrStr_ClearAttributeError();
24984  }
24985  return result;
24986 }
24987 
24988 /* SetupReduce */
24989 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
24990  int ret;
24991  PyObject *name_attr;
24992  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
24993  if (likely(name_attr)) {
24994  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
24995  } else {
24996  ret = -1;
24997  }
24998  if (unlikely(ret < 0)) {
24999  PyErr_Clear();
25000  ret = 0;
25001  }
25002  Py_XDECREF(name_attr);
25003  return ret;
25004 }
25005 static int __Pyx_setup_reduce(PyObject* type_obj) {
25006  int ret = 0;
25007  PyObject *object_reduce = NULL;
25008  PyObject *object_getstate = NULL;
25009  PyObject *object_reduce_ex = NULL;
25010  PyObject *reduce = NULL;
25011  PyObject *reduce_ex = NULL;
25012  PyObject *reduce_cython = NULL;
25013  PyObject *setstate = NULL;
25014  PyObject *setstate_cython = NULL;
25015  PyObject *getstate = NULL;
25016 #if CYTHON_USE_PYTYPE_LOOKUP
25017  getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
25018 #else
25019  getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
25020  if (!getstate && PyErr_Occurred()) {
25021  goto __PYX_BAD;
25022  }
25023 #endif
25024  if (getstate) {
25025 #if CYTHON_USE_PYTYPE_LOOKUP
25026  object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
25027 #else
25028  object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
25029  if (!object_getstate && PyErr_Occurred()) {
25030  goto __PYX_BAD;
25031  }
25032 #endif
25033  if (object_getstate != getstate) {
25034  goto __PYX_GOOD;
25035  }
25036  }
25037 #if CYTHON_USE_PYTYPE_LOOKUP
25038  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
25039 #else
25040  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
25041 #endif
25042  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
25043  if (reduce_ex == object_reduce_ex) {
25044 #if CYTHON_USE_PYTYPE_LOOKUP
25045  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
25046 #else
25047  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
25048 #endif
25049  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
25050  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
25051  reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
25052  if (likely(reduce_cython)) {
25053  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
25054  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
25055  } else if (reduce == object_reduce || PyErr_Occurred()) {
25056  goto __PYX_BAD;
25057  }
25058  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
25059  if (!setstate) PyErr_Clear();
25060  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
25061  setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
25062  if (likely(setstate_cython)) {
25063  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
25064  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
25065  } else if (!setstate || PyErr_Occurred()) {
25066  goto __PYX_BAD;
25067  }
25068  }
25069  PyType_Modified((PyTypeObject*)type_obj);
25070  }
25071  }
25072  goto __PYX_GOOD;
25073 __PYX_BAD:
25074  if (!PyErr_Occurred())
25075  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
25076  ret = -1;
25077 __PYX_GOOD:
25078 #if !CYTHON_USE_PYTYPE_LOOKUP
25079  Py_XDECREF(object_reduce);
25080  Py_XDECREF(object_reduce_ex);
25081  Py_XDECREF(object_getstate);
25082  Py_XDECREF(getstate);
25083 #endif
25084  Py_XDECREF(reduce);
25085  Py_XDECREF(reduce_ex);
25086  Py_XDECREF(reduce_cython);
25087  Py_XDECREF(setstate);
25088  Py_XDECREF(setstate_cython);
25089  return ret;
25090 }
25091 
25092 /* FetchCommonType */
25093 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
25094  PyObject* fake_module;
25095  PyTypeObject* cached_type = NULL;
25096  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
25097  if (!fake_module) return NULL;
25098  Py_INCREF(fake_module);
25099  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
25100  if (cached_type) {
25101  if (!PyType_Check((PyObject*)cached_type)) {
25102  PyErr_Format(PyExc_TypeError,
25103  "Shared Cython type %.200s is not a type object",
25104  type->tp_name);
25105  goto bad;
25106  }
25107  if (cached_type->tp_basicsize != type->tp_basicsize) {
25108  PyErr_Format(PyExc_TypeError,
25109  "Shared Cython type %.200s has the wrong size, try recompiling",
25110  type->tp_name);
25111  goto bad;
25112  }
25113  } else {
25114  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
25115  PyErr_Clear();
25116  if (PyType_Ready(type) < 0) goto bad;
25117  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
25118  goto bad;
25119  Py_INCREF(type);
25120  cached_type = type;
25121  }
25122 done:
25123  Py_DECREF(fake_module);
25124  return cached_type;
25125 bad:
25126  Py_XDECREF(cached_type);
25127  cached_type = NULL;
25128  goto done;
25129 }
25130 
25131 /* CythonFunctionShared */
25132 #include <structmember.h>
25133 static PyObject *
25134 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
25135 {
25136  if (unlikely(op->func_doc == NULL)) {
25137  if (op->func.m_ml->ml_doc) {
25138 #if PY_MAJOR_VERSION >= 3
25139  op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
25140 #else
25141  op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
25142 #endif
25143  if (unlikely(op->func_doc == NULL))
25144  return NULL;
25145  } else {
25146  Py_INCREF(Py_None);
25147  return Py_None;
25148  }
25149  }
25150  Py_INCREF(op->func_doc);
25151  return op->func_doc;
25152 }
25153 static int
25154 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
25155 {
25156  PyObject *tmp = op->func_doc;
25157  if (value == NULL) {
25158  value = Py_None;
25159  }
25160  Py_INCREF(value);
25161  op->func_doc = value;
25162  Py_XDECREF(tmp);
25163  return 0;
25164 }
25165 static PyObject *
25166 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25167 {
25168  if (unlikely(op->func_name == NULL)) {
25169 #if PY_MAJOR_VERSION >= 3
25170  op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
25171 #else
25172  op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
25173 #endif
25174  if (unlikely(op->func_name == NULL))
25175  return NULL;
25176  }
25177  Py_INCREF(op->func_name);
25178  return op->func_name;
25179 }
25180 static int
25181 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
25182 {
25183  PyObject *tmp;
25184 #if PY_MAJOR_VERSION >= 3
25185  if (unlikely(value == NULL || !PyUnicode_Check(value)))
25186 #else
25187  if (unlikely(value == NULL || !PyString_Check(value)))
25188 #endif
25189  {
25190  PyErr_SetString(PyExc_TypeError,
25191  "__name__ must be set to a string object");
25192  return -1;
25193  }
25194  tmp = op->func_name;
25195  Py_INCREF(value);
25196  op->func_name = value;
25197  Py_XDECREF(tmp);
25198  return 0;
25199 }
25200 static PyObject *
25201 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25202 {
25203  Py_INCREF(op->func_qualname);
25204  return op->func_qualname;
25205 }
25206 static int
25207 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
25208 {
25209  PyObject *tmp;
25210 #if PY_MAJOR_VERSION >= 3
25211  if (unlikely(value == NULL || !PyUnicode_Check(value)))
25212 #else
25213  if (unlikely(value == NULL || !PyString_Check(value)))
25214 #endif
25215  {
25216  PyErr_SetString(PyExc_TypeError,
25217  "__qualname__ must be set to a string object");
25218  return -1;
25219  }
25220  tmp = op->func_qualname;
25221  Py_INCREF(value);
25222  op->func_qualname = value;
25223  Py_XDECREF(tmp);
25224  return 0;
25225 }
25226 static PyObject *
25227 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
25228 {
25229  PyObject *self;
25230  self = m->func_closure;
25231  if (self == NULL)
25232  self = Py_None;
25233  Py_INCREF(self);
25234  return self;
25235 }
25236 static PyObject *
25237 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25238 {
25239  if (unlikely(op->func_dict == NULL)) {
25240  op->func_dict = PyDict_New();
25241  if (unlikely(op->func_dict == NULL))
25242  return NULL;
25243  }
25244  Py_INCREF(op->func_dict);
25245  return op->func_dict;
25246 }
25247 static int
25248 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
25249 {
25250  PyObject *tmp;
25251  if (unlikely(value == NULL)) {
25252  PyErr_SetString(PyExc_TypeError,
25253  "function's dictionary may not be deleted");
25254  return -1;
25255  }
25256  if (unlikely(!PyDict_Check(value))) {
25257  PyErr_SetString(PyExc_TypeError,
25258  "setting function's dictionary to a non-dict");
25259  return -1;
25260  }
25261  tmp = op->func_dict;
25262  Py_INCREF(value);
25263  op->func_dict = value;
25264  Py_XDECREF(tmp);
25265  return 0;
25266 }
25267 static PyObject *
25268 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25269 {
25270  Py_INCREF(op->func_globals);
25271  return op->func_globals;
25272 }
25273 static PyObject *
25274 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25275 {
25276  Py_INCREF(Py_None);
25277  return Py_None;
25278 }
25279 static PyObject *
25280 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25281 {
25282  PyObject* result = (op->func_code) ? op->func_code : Py_None;
25283  Py_INCREF(result);
25284  return result;
25285 }
25286 static int
25287 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
25288  int result = 0;
25289  PyObject *res = op->defaults_getter((PyObject *) op);
25290  if (unlikely(!res))
25291  return -1;
25292  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25293  op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
25294  Py_INCREF(op->defaults_tuple);
25295  op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
25296  Py_INCREF(op->defaults_kwdict);
25297  #else
25298  op->defaults_tuple = PySequence_ITEM(res, 0);
25299  if (unlikely(!op->defaults_tuple)) result = -1;
25300  else {
25301  op->defaults_kwdict = PySequence_ITEM(res, 1);
25302  if (unlikely(!op->defaults_kwdict)) result = -1;
25303  }
25304  #endif
25305  Py_DECREF(res);
25306  return result;
25307 }
25308 static int
25309 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
25310  PyObject* tmp;
25311  if (!value) {
25312  value = Py_None;
25313  } else if (value != Py_None && !PyTuple_Check(value)) {
25314  PyErr_SetString(PyExc_TypeError,
25315  "__defaults__ must be set to a tuple object");
25316  return -1;
25317  }
25318  Py_INCREF(value);
25319  tmp = op->defaults_tuple;
25320  op->defaults_tuple = value;
25321  Py_XDECREF(tmp);
25322  return 0;
25323 }
25324 static PyObject *
25325 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
25326  PyObject* result = op->defaults_tuple;
25327  if (unlikely(!result)) {
25328  if (op->defaults_getter) {
25329  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
25330  result = op->defaults_tuple;
25331  } else {
25332  result = Py_None;
25333  }
25334  }
25335  Py_INCREF(result);
25336  return result;
25337 }
25338 static int
25339 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
25340  PyObject* tmp;
25341  if (!value) {
25342  value = Py_None;
25343  } else if (value != Py_None && !PyDict_Check(value)) {
25344  PyErr_SetString(PyExc_TypeError,
25345  "__kwdefaults__ must be set to a dict object");
25346  return -1;
25347  }
25348  Py_INCREF(value);
25349  tmp = op->defaults_kwdict;
25350  op->defaults_kwdict = value;
25351  Py_XDECREF(tmp);
25352  return 0;
25353 }
25354 static PyObject *
25355 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
25356  PyObject* result = op->defaults_kwdict;
25357  if (unlikely(!result)) {
25358  if (op->defaults_getter) {
25359  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
25360  result = op->defaults_kwdict;
25361  } else {
25362  result = Py_None;
25363  }
25364  }
25365  Py_INCREF(result);
25366  return result;
25367 }
25368 static int
25369 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
25370  PyObject* tmp;
25371  if (!value || value == Py_None) {
25372  value = NULL;
25373  } else if (!PyDict_Check(value)) {
25374  PyErr_SetString(PyExc_TypeError,
25375  "__annotations__ must be set to a dict object");
25376  return -1;
25377  }
25378  Py_XINCREF(value);
25379  tmp = op->func_annotations;
25380  op->func_annotations = value;
25381  Py_XDECREF(tmp);
25382  return 0;
25383 }
25384 static PyObject *
25385 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
25386  PyObject* result = op->func_annotations;
25387  if (unlikely(!result)) {
25388  result = PyDict_New();
25389  if (unlikely(!result)) return NULL;
25390  op->func_annotations = result;
25391  }
25392  Py_INCREF(result);
25393  return result;
25394 }
25395 static PyGetSetDef __pyx_CyFunction_getsets[] = {
25396  {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
25397  {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
25398  {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
25399  {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
25400  {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
25401  {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
25402  {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
25403  {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
25404  {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
25405  {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
25406  {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
25407  {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
25408  {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
25409  {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
25410  {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
25411  {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
25412  {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
25413  {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
25414  {0, 0, 0, 0, 0}
25415 };
25416 static PyMemberDef __pyx_CyFunction_members[] = {
25417  {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
25418  {0, 0, 0, 0, 0}
25419 };
25420 static PyObject *
25421 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
25422 {
25423 #if PY_MAJOR_VERSION >= 3
25424  Py_INCREF(m->func_qualname);
25425  return m->func_qualname;
25426 #else
25427  return PyString_FromString(m->func.m_ml->ml_name);
25428 #endif
25429 }
25430 static PyMethodDef __pyx_CyFunction_methods[] = {
25431  {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
25432  {0, 0, 0, 0}
25433 };
25434 #if PY_VERSION_HEX < 0x030500A0
25435 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
25436 #else
25437 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
25438 #endif
25439 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
25440  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
25441  if (unlikely(op == NULL))
25442  return NULL;
25443  op->flags = flags;
25444  __Pyx_CyFunction_weakreflist(op) = NULL;
25445  op->func.m_ml = ml;
25446  op->func.m_self = (PyObject *) op;
25447  Py_XINCREF(closure);
25448  op->func_closure = closure;
25449  Py_XINCREF(module);
25450  op->func.m_module = module;
25451  op->func_dict = NULL;
25452  op->func_name = NULL;
25453  Py_INCREF(qualname);
25454  op->func_qualname = qualname;
25455  op->func_doc = NULL;
25456  op->func_classobj = NULL;
25457  op->func_globals = globals;
25458  Py_INCREF(op->func_globals);
25459  Py_XINCREF(code);
25460  op->func_code = code;
25461  op->defaults_pyobjects = 0;
25462  op->defaults_size = 0;
25463  op->defaults = NULL;
25464  op->defaults_tuple = NULL;
25465  op->defaults_kwdict = NULL;
25466  op->defaults_getter = NULL;
25467  op->func_annotations = NULL;
25468  return (PyObject *) op;
25469 }
25470 static int
25471 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
25472 {
25473  Py_CLEAR(m->func_closure);
25474  Py_CLEAR(m->func.m_module);
25475  Py_CLEAR(m->func_dict);
25476  Py_CLEAR(m->func_name);
25477  Py_CLEAR(m->func_qualname);
25478  Py_CLEAR(m->func_doc);
25479  Py_CLEAR(m->func_globals);
25480  Py_CLEAR(m->func_code);
25481  Py_CLEAR(m->func_classobj);
25482  Py_CLEAR(m->defaults_tuple);
25483  Py_CLEAR(m->defaults_kwdict);
25484  Py_CLEAR(m->func_annotations);
25485  if (m->defaults) {
25486  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
25487  int i;
25488  for (i = 0; i < m->defaults_pyobjects; i++)
25489  Py_XDECREF(pydefaults[i]);
25490  PyObject_Free(m->defaults);
25491  m->defaults = NULL;
25492  }
25493  return 0;
25494 }
25495 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
25496 {
25497  if (__Pyx_CyFunction_weakreflist(m) != NULL)
25498  PyObject_ClearWeakRefs((PyObject *) m);
25499  __Pyx_CyFunction_clear(m);
25500  PyObject_GC_Del(m);
25501 }
25502 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
25503 {
25504  PyObject_GC_UnTrack(m);
25505  __Pyx__CyFunction_dealloc(m);
25506 }
25507 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
25508 {
25509  Py_VISIT(m->func_closure);
25510  Py_VISIT(m->func.m_module);
25511  Py_VISIT(m->func_dict);
25512  Py_VISIT(m->func_name);
25513  Py_VISIT(m->func_qualname);
25514  Py_VISIT(m->func_doc);
25515  Py_VISIT(m->func_globals);
25516  Py_VISIT(m->func_code);
25517  Py_VISIT(m->func_classobj);
25518  Py_VISIT(m->defaults_tuple);
25519  Py_VISIT(m->defaults_kwdict);
25520  if (m->defaults) {
25521  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
25522  int i;
25523  for (i = 0; i < m->defaults_pyobjects; i++)
25524  Py_VISIT(pydefaults[i]);
25525  }
25526  return 0;
25527 }
25528 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
25529 {
25530 #if PY_MAJOR_VERSION < 3
25531  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
25532  if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
25533  Py_INCREF(func);
25534  return func;
25535  }
25536  if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
25537  if (type == NULL)
25538  type = (PyObject *)(Py_TYPE(obj));
25539  return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
25540  }
25541  if (obj == Py_None)
25542  obj = NULL;
25543 #endif
25544  return __Pyx_PyMethod_New(func, obj, type);
25545 }
25546 static PyObject*
25547 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
25548 {
25549 #if PY_MAJOR_VERSION >= 3
25550  return PyUnicode_FromFormat("<cyfunction %U at %p>",
25551  op->func_qualname, (void *)op);
25552 #else
25553  return PyString_FromFormat("<cyfunction %s at %p>",
25554  PyString_AsString(op->func_qualname), (void *)op);
25555 #endif
25556 }
25557 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
25558  PyCFunctionObject* f = (PyCFunctionObject*)func;
25559  PyCFunction meth = f->m_ml->ml_meth;
25560  Py_ssize_t size;
25561  switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
25562  case METH_VARARGS:
25563  if (likely(kw == NULL || PyDict_Size(kw) == 0))
25564  return (*meth)(self, arg);
25565  break;
25566  case METH_VARARGS | METH_KEYWORDS:
25567  return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
25568  case METH_NOARGS:
25569  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
25570  size = PyTuple_GET_SIZE(arg);
25571  if (likely(size == 0))
25572  return (*meth)(self, NULL);
25573  PyErr_Format(PyExc_TypeError,
25574  "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
25575  f->m_ml->ml_name, size);
25576  return NULL;
25577  }
25578  break;
25579  case METH_O:
25580  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
25581  size = PyTuple_GET_SIZE(arg);
25582  if (likely(size == 1)) {
25583  PyObject *result, *arg0;
25584  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25585  arg0 = PyTuple_GET_ITEM(arg, 0);
25586  #else
25587  arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
25588  #endif
25589  result = (*meth)(self, arg0);
25590  #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
25591  Py_DECREF(arg0);
25592  #endif
25593  return result;
25594  }
25595  PyErr_Format(PyExc_TypeError,
25596  "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
25597  f->m_ml->ml_name, size);
25598  return NULL;
25599  }
25600  break;
25601  default:
25602  PyErr_SetString(PyExc_SystemError, "Bad call flags in "
25603  "__Pyx_CyFunction_Call. METH_OLDARGS is no "
25604  "longer supported!");
25605  return NULL;
25606  }
25607  PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
25608  f->m_ml->ml_name);
25609  return NULL;
25610 }
25611 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
25612  return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
25613 }
25614 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
25615  PyObject *result;
25616  __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
25617  if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
25618  Py_ssize_t argc;
25619  PyObject *new_args;
25620  PyObject *self;
25621  argc = PyTuple_GET_SIZE(args);
25622  new_args = PyTuple_GetSlice(args, 1, argc);
25623  if (unlikely(!new_args))
25624  return NULL;
25625  self = PyTuple_GetItem(args, 0);
25626  if (unlikely(!self)) {
25627  Py_DECREF(new_args);
25628 #if PY_MAJOR_VERSION > 2
25629  PyErr_Format(PyExc_TypeError,
25630  "unbound method %.200S() needs an argument",
25631  cyfunc->func_qualname);
25632 #else
25633  PyErr_SetString(PyExc_TypeError,
25634  "unbound method needs an argument");
25635 #endif
25636  return NULL;
25637  }
25638  result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
25639  Py_DECREF(new_args);
25640  } else {
25641  result = __Pyx_CyFunction_Call(func, args, kw);
25642  }
25643  return result;
25644 }
25645 static PyTypeObject __pyx_CyFunctionType_type = {
25646  PyVarObject_HEAD_INIT(0, 0)
25647  "cython_function_or_method",
25648  sizeof(__pyx_CyFunctionObject),
25649  0,
25650  (destructor) __Pyx_CyFunction_dealloc,
25651  0,
25652  0,
25653  0,
25654 #if PY_MAJOR_VERSION < 3
25655  0,
25656 #else
25657  0,
25658 #endif
25659  (reprfunc) __Pyx_CyFunction_repr,
25660  0,
25661  0,
25662  0,
25663  0,
25664  __Pyx_CyFunction_CallAsMethod,
25665  0,
25666  0,
25667  0,
25668  0,
25669  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
25670  0,
25671  (traverseproc) __Pyx_CyFunction_traverse,
25672  (inquiry) __Pyx_CyFunction_clear,
25673  0,
25674 #if PY_VERSION_HEX < 0x030500A0
25675  offsetof(__pyx_CyFunctionObject, func_weakreflist),
25676 #else
25677  offsetof(PyCFunctionObject, m_weakreflist),
25678 #endif
25679  0,
25680  0,
25681  __pyx_CyFunction_methods,
25682  __pyx_CyFunction_members,
25683  __pyx_CyFunction_getsets,
25684  0,
25685  0,
25686  __Pyx_CyFunction_descr_get,
25687  0,
25688  offsetof(__pyx_CyFunctionObject, func_dict),
25689  0,
25690  0,
25691  0,
25692  0,
25693  0,
25694  0,
25695  0,
25696  0,
25697  0,
25698  0,
25699  0,
25700  0,
25701 #if PY_VERSION_HEX >= 0x030400a1
25702  0,
25703 #endif
25704 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
25705  0,
25706 #endif
25707 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
25708  0,
25709 #endif
25710 #if PY_VERSION_HEX >= 0x030C0000
25711  0,
25712 #endif
25713 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
25714  0,
25715 #endif
25716 };
25717 static int __pyx_CyFunction_init(void) {
25718  __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
25719  if (unlikely(__pyx_CyFunctionType == NULL)) {
25720  return -1;
25721  }
25722  return 0;
25723 }
25724 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
25725  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
25726  m->defaults = PyObject_Malloc(size);
25727  if (unlikely(!m->defaults))
25728  return PyErr_NoMemory();
25729  memset(m->defaults, 0, size);
25730  m->defaults_pyobjects = pyobjects;
25731  m->defaults_size = size;
25732  return m->defaults;
25733 }
25734 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
25735  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
25736  m->defaults_tuple = tuple;
25737  Py_INCREF(tuple);
25738 }
25739 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
25740  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
25741  m->defaults_kwdict = dict;
25742  Py_INCREF(dict);
25743 }
25744 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
25745  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
25746  m->func_annotations = dict;
25747  Py_INCREF(dict);
25748 }
25749 
25750 /* CythonFunction */
25751 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
25752  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
25753  PyObject *op = __Pyx_CyFunction_Init(
25754  PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
25755  ml, flags, qualname, closure, module, globals, code
25756  );
25757  if (likely(op)) {
25758  PyObject_GC_Track(op);
25759  }
25760  return op;
25761 }
25762 
25763 /* CLineInTraceback */
25764 #ifndef CYTHON_CLINE_IN_TRACEBACK
25765 static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
25766  PyObject *use_cline;
25767  PyObject *ptype, *pvalue, *ptraceback;
25768 #if CYTHON_COMPILING_IN_CPYTHON
25769  PyObject **cython_runtime_dict;
25770 #endif
25771  if (unlikely(!__pyx_cython_runtime)) {
25772  return c_line;
25773  }
25774  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
25775 #if CYTHON_COMPILING_IN_CPYTHON
25776  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
25777  if (likely(cython_runtime_dict)) {
25778  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
25779  use_cline, *cython_runtime_dict,
25780  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
25781  } else
25782 #endif
25783  {
25784  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
25785  if (use_cline_obj) {
25786  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
25787  Py_DECREF(use_cline_obj);
25788  } else {
25789  PyErr_Clear();
25790  use_cline = NULL;
25791  }
25792  }
25793  if (!use_cline) {
25794  c_line = 0;
25795  (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
25796  }
25797  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
25798  c_line = 0;
25799  }
25800  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
25801  return c_line;
25802 }
25803 #endif
25804 
25805 /* CodeObjectCache */
25806 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
25807  int start = 0, mid = 0, end = count - 1;
25808  if (end >= 0 && code_line > entries[end].code_line) {
25809  return count;
25810  }
25811  while (start < end) {
25812  mid = start + (end - start) / 2;
25813  if (code_line < entries[mid].code_line) {
25814  end = mid;
25815  } else if (code_line > entries[mid].code_line) {
25816  start = mid + 1;
25817  } else {
25818  return mid;
25819  }
25820  }
25821  if (code_line <= entries[mid].code_line) {
25822  return mid;
25823  } else {
25824  return mid + 1;
25825  }
25826 }
25827 static PyCodeObject *__pyx_find_code_object(int code_line) {
25828  PyCodeObject* code_object;
25829  int pos;
25830  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
25831  return NULL;
25832  }
25833  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
25834  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
25835  return NULL;
25836  }
25837  code_object = __pyx_code_cache.entries[pos].code_object;
25838  Py_INCREF(code_object);
25839  return code_object;
25840 }
25841 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
25842  int pos, i;
25843  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
25844  if (unlikely(!code_line)) {
25845  return;
25846  }
25847  if (unlikely(!entries)) {
25848  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
25849  if (likely(entries)) {
25850  __pyx_code_cache.entries = entries;
25851  __pyx_code_cache.max_count = 64;
25852  __pyx_code_cache.count = 1;
25853  entries[0].code_line = code_line;
25854  entries[0].code_object = code_object;
25855  Py_INCREF(code_object);
25856  }
25857  return;
25858  }
25859  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
25860  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
25861  PyCodeObject* tmp = entries[pos].code_object;
25862  entries[pos].code_object = code_object;
25863  Py_DECREF(tmp);
25864  return;
25865  }
25866  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
25867  int new_max = __pyx_code_cache.max_count + 64;
25868  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
25869  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
25870  if (unlikely(!entries)) {
25871  return;
25872  }
25873  __pyx_code_cache.entries = entries;
25874  __pyx_code_cache.max_count = new_max;
25875  }
25876  for (i=__pyx_code_cache.count; i>pos; i--) {
25877  entries[i] = entries[i-1];
25878  }
25879  entries[pos].code_line = code_line;
25880  entries[pos].code_object = code_object;
25881  __pyx_code_cache.count++;
25882  Py_INCREF(code_object);
25883 }
25884 
25885 /* AddTraceback */
25886 #include "compile.h"
25887 #include "frameobject.h"
25888 #include "traceback.h"
25889 #if PY_VERSION_HEX >= 0x030b00a6
25890  #ifndef Py_BUILD_CORE
25891  #define Py_BUILD_CORE 1
25892  #endif
25893  #include "internal/pycore_frame.h"
25894 #endif
25895 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
25896  const char *funcname, int c_line,
25897  int py_line, const char *filename) {
25898  PyCodeObject *py_code = NULL;
25899  PyObject *py_funcname = NULL;
25900  #if PY_MAJOR_VERSION < 3
25901  PyObject *py_srcfile = NULL;
25902  py_srcfile = PyString_FromString(filename);
25903  if (!py_srcfile) goto bad;
25904  #endif
25905  if (c_line) {
25906  #if PY_MAJOR_VERSION < 3
25907  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
25908  if (!py_funcname) goto bad;
25909  #else
25910  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
25911  if (!py_funcname) goto bad;
25912  funcname = PyUnicode_AsUTF8(py_funcname);
25913  if (!funcname) goto bad;
25914  #endif
25915  }
25916  else {
25917  #if PY_MAJOR_VERSION < 3
25918  py_funcname = PyString_FromString(funcname);
25919  if (!py_funcname) goto bad;
25920  #endif
25921  }
25922  #if PY_MAJOR_VERSION < 3
25923  py_code = __Pyx_PyCode_New(
25924  0,
25925  0,
25926  0,
25927  0,
25928  0,
25929  __pyx_empty_bytes, /*PyObject *code,*/
25930  __pyx_empty_tuple, /*PyObject *consts,*/
25931  __pyx_empty_tuple, /*PyObject *names,*/
25932  __pyx_empty_tuple, /*PyObject *varnames,*/
25933  __pyx_empty_tuple, /*PyObject *freevars,*/
25934  __pyx_empty_tuple, /*PyObject *cellvars,*/
25935  py_srcfile, /*PyObject *filename,*/
25936  py_funcname, /*PyObject *name,*/
25937  py_line,
25938  __pyx_empty_bytes /*PyObject *lnotab*/
25939  );
25940  Py_DECREF(py_srcfile);
25941  #else
25942  py_code = PyCode_NewEmpty(filename, funcname, py_line);
25943  #endif
25944  Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
25945  return py_code;
25946 bad:
25947  Py_XDECREF(py_funcname);
25948  #if PY_MAJOR_VERSION < 3
25949  Py_XDECREF(py_srcfile);
25950  #endif
25951  return NULL;
25952 }
25953 static void __Pyx_AddTraceback(const char *funcname, int c_line,
25954  int py_line, const char *filename) {
25955  PyCodeObject *py_code = 0;
25956  PyFrameObject *py_frame = 0;
25957  PyThreadState *tstate = __Pyx_PyThreadState_Current;
25958  PyObject *ptype, *pvalue, *ptraceback;
25959  if (c_line) {
25960  c_line = __Pyx_CLineForTraceback(tstate, c_line);
25961  }
25962  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
25963  if (!py_code) {
25964  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
25965  py_code = __Pyx_CreateCodeObjectForTraceback(
25966  funcname, c_line, py_line, filename);
25967  if (!py_code) {
25968  /* If the code object creation fails, then we should clear the
25969  fetched exception references and propagate the new exception */
25970  Py_XDECREF(ptype);
25971  Py_XDECREF(pvalue);
25972  Py_XDECREF(ptraceback);
25973  goto bad;
25974  }
25975  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
25976  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
25977  }
25978  py_frame = PyFrame_New(
25979  tstate, /*PyThreadState *tstate,*/
25980  py_code, /*PyCodeObject *code,*/
25981  __pyx_d, /*PyObject *globals,*/
25982  0 /*PyObject *locals*/
25983  );
25984  if (!py_frame) goto bad;
25985  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
25986  PyTraceBack_Here(py_frame);
25987 bad:
25988  Py_XDECREF(py_code);
25989  Py_XDECREF(py_frame);
25990 }
25991 
25992 #if PY_MAJOR_VERSION < 3
25993 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
25994  if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
25995  if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
25996  if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
25997  PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
25998  return -1;
25999 }
26000 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
26001  PyObject *obj = view->obj;
26002  if (!obj) return;
26003  if (PyObject_CheckBuffer(obj)) {
26004  PyBuffer_Release(view);
26005  return;
26006  }
26007  if ((0)) {}
26008  view->obj = NULL;
26009  Py_DECREF(obj);
26010 }
26011 #endif
26012 
26013 
26014 /* MemviewSliceIsContig */
26015 static int
26016 __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
26017 {
26018  int i, index, step, start;
26019  Py_ssize_t itemsize = mvs.memview->view.itemsize;
26020  if (order == 'F') {
26021  step = 1;
26022  start = 0;
26023  } else {
26024  step = -1;
26025  start = ndim - 1;
26026  }
26027  for (i = 0; i < ndim; i++) {
26028  index = start + step * i;
26029  if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
26030  return 0;
26031  itemsize *= mvs.shape[index];
26032  }
26033  return 1;
26034 }
26035 
26036 /* OverlappingSlices */
26037 static void
26038 __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
26039  void **out_start, void **out_end,
26040  int ndim, size_t itemsize)
26041 {
26042  char *start, *end;
26043  int i;
26044  start = end = slice->data;
26045  for (i = 0; i < ndim; i++) {
26046  Py_ssize_t stride = slice->strides[i];
26047  Py_ssize_t extent = slice->shape[i];
26048  if (extent == 0) {
26049  *out_start = *out_end = start;
26050  return;
26051  } else {
26052  if (stride > 0)
26053  end += stride * (extent - 1);
26054  else
26055  start += stride * (extent - 1);
26056  }
26057  }
26058  *out_start = start;
26059  *out_end = end + itemsize;
26060 }
26061 static int
26062 __pyx_slices_overlap(__Pyx_memviewslice *slice1,
26063  __Pyx_memviewslice *slice2,
26064  int ndim, size_t itemsize)
26065 {
26066  void *start1, *end1, *start2, *end2;
26067  __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
26068  __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
26069  return (start1 < end2) && (start2 < end1);
26070 }
26071 
26072 /* Capsule */
26073 static CYTHON_INLINE PyObject *
26074 __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
26075 {
26076  PyObject *cobj;
26077 #if PY_VERSION_HEX >= 0x02070000
26078  cobj = PyCapsule_New(p, sig, NULL);
26079 #else
26080  cobj = PyCObject_FromVoidPtr(p, NULL);
26081 #endif
26082  return cobj;
26083 }
26084 
26085 /* IsLittleEndian */
26086 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
26087 {
26088  union {
26089  uint32_t u32;
26090  uint8_t u8[4];
26091  } S;
26092  S.u32 = 0x01020304;
26093  return S.u8[0] == 4;
26094 }
26095 
26096 /* BufferFormatCheck */
26097 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
26098  __Pyx_BufFmt_StackElem* stack,
26099  __Pyx_TypeInfo* type) {
26100  stack[0].field = &ctx->root;
26101  stack[0].parent_offset = 0;
26102  ctx->root.type = type;
26103  ctx->root.name = "buffer dtype";
26104  ctx->root.offset = 0;
26105  ctx->head = stack;
26106  ctx->head->field = &ctx->root;
26107  ctx->fmt_offset = 0;
26108  ctx->head->parent_offset = 0;
26109  ctx->new_packmode = '@';
26110  ctx->enc_packmode = '@';
26111  ctx->new_count = 1;
26112  ctx->enc_count = 0;
26113  ctx->enc_type = 0;
26114  ctx->is_complex = 0;
26115  ctx->is_valid_array = 0;
26116  ctx->struct_alignment = 0;
26117  while (type->typegroup == 'S') {
26118  ++ctx->head;
26119  ctx->head->field = type->fields;
26120  ctx->head->parent_offset = 0;
26121  type = type->fields->type;
26122  }
26123 }
26124 static int __Pyx_BufFmt_ParseNumber(const char** ts) {
26125  int count;
26126  const char* t = *ts;
26127  if (*t < '0' || *t > '9') {
26128  return -1;
26129  } else {
26130  count = *t++ - '0';
26131  while (*t >= '0' && *t <= '9') {
26132  count *= 10;
26133  count += *t++ - '0';
26134  }
26135  }
26136  *ts = t;
26137  return count;
26138 }
26139 static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
26140  int number = __Pyx_BufFmt_ParseNumber(ts);
26141  if (number == -1)
26142  PyErr_Format(PyExc_ValueError,\
26143  "Does not understand character buffer dtype format string ('%c')", **ts);
26144  return number;
26145 }
26146 static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
26147  PyErr_Format(PyExc_ValueError,
26148  "Unexpected format string character: '%c'", ch);
26149 }
26150 static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
26151  switch (ch) {
26152  case '?': return "'bool'";
26153  case 'c': return "'char'";
26154  case 'b': return "'signed char'";
26155  case 'B': return "'unsigned char'";
26156  case 'h': return "'short'";
26157  case 'H': return "'unsigned short'";
26158  case 'i': return "'int'";
26159  case 'I': return "'unsigned int'";
26160  case 'l': return "'long'";
26161  case 'L': return "'unsigned long'";
26162  case 'q': return "'long long'";
26163  case 'Q': return "'unsigned long long'";
26164  case 'f': return (is_complex ? "'complex float'" : "'float'");
26165  case 'd': return (is_complex ? "'complex double'" : "'double'");
26166  case 'g': return (is_complex ? "'complex long double'" : "'long double'");
26167  case 'T': return "a struct";
26168  case 'O': return "Python object";
26169  case 'P': return "a pointer";
26170  case 's': case 'p': return "a string";
26171  case 0: return "end";
26172  default: return "unparseable format string";
26173  }
26174 }
26175 static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
26176  switch (ch) {
26177  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
26178  case 'h': case 'H': return 2;
26179  case 'i': case 'I': case 'l': case 'L': return 4;
26180  case 'q': case 'Q': return 8;
26181  case 'f': return (is_complex ? 8 : 4);
26182  case 'd': return (is_complex ? 16 : 8);
26183  case 'g': {
26184  PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
26185  return 0;
26186  }
26187  case 'O': case 'P': return sizeof(void*);
26188  default:
26189  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
26190  return 0;
26191  }
26192 }
26193 static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
26194  switch (ch) {
26195  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
26196  case 'h': case 'H': return sizeof(short);
26197  case 'i': case 'I': return sizeof(int);
26198  case 'l': case 'L': return sizeof(long);
26199  #ifdef HAVE_LONG_LONG
26200  case 'q': case 'Q': return sizeof(PY_LONG_LONG);
26201  #endif
26202  case 'f': return sizeof(float) * (is_complex ? 2 : 1);
26203  case 'd': return sizeof(double) * (is_complex ? 2 : 1);
26204  case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
26205  case 'O': case 'P': return sizeof(void*);
26206  default: {
26207  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
26208  return 0;
26209  }
26210  }
26211 }
26212 typedef struct { char c; short x; } __Pyx_st_short;
26213 typedef struct { char c; int x; } __Pyx_st_int;
26214 typedef struct { char c; long x; } __Pyx_st_long;
26215 typedef struct { char c; float x; } __Pyx_st_float;
26216 typedef struct { char c; double x; } __Pyx_st_double;
26217 typedef struct { char c; long double x; } __Pyx_st_longdouble;
26218 typedef struct { char c; void *x; } __Pyx_st_void_p;
26219 #ifdef HAVE_LONG_LONG
26220 typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
26221 #endif
26222 static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
26223  switch (ch) {
26224  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
26225  case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
26226  case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
26227  case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
26228 #ifdef HAVE_LONG_LONG
26229  case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
26230 #endif
26231  case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
26232  case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
26233  case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
26234  case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
26235  default:
26236  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
26237  return 0;
26238  }
26239 }
26240 /* These are for computing the padding at the end of the struct to align
26241  on the first member of the struct. This will probably the same as above,
26242  but we don't have any guarantees.
26243  */
26244 typedef struct { short x; char c; } __Pyx_pad_short;
26245 typedef struct { int x; char c; } __Pyx_pad_int;
26246 typedef struct { long x; char c; } __Pyx_pad_long;
26247 typedef struct { float x; char c; } __Pyx_pad_float;
26248 typedef struct { double x; char c; } __Pyx_pad_double;
26249 typedef struct { long double x; char c; } __Pyx_pad_longdouble;
26250 typedef struct { void *x; char c; } __Pyx_pad_void_p;
26251 #ifdef HAVE_LONG_LONG
26252 typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
26253 #endif
26254 static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
26255  switch (ch) {
26256  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
26257  case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
26258  case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
26259  case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
26260 #ifdef HAVE_LONG_LONG
26261  case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
26262 #endif
26263  case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
26264  case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
26265  case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
26266  case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
26267  default:
26268  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
26269  return 0;
26270  }
26271 }
26272 static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
26273  switch (ch) {
26274  case 'c':
26275  return 'H';
26276  case 'b': case 'h': case 'i':
26277  case 'l': case 'q': case 's': case 'p':
26278  return 'I';
26279  case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
26280  return 'U';
26281  case 'f': case 'd': case 'g':
26282  return (is_complex ? 'C' : 'R');
26283  case 'O':
26284  return 'O';
26285  case 'P':
26286  return 'P';
26287  default: {
26288  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
26289  return 0;
26290  }
26291  }
26292 }
26293 static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
26294  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
26295  const char* expected;
26296  const char* quote;
26297  if (ctx->head == NULL) {
26298  expected = "end";
26299  quote = "";
26300  } else {
26301  expected = ctx->head->field->type->name;
26302  quote = "'";
26303  }
26304  PyErr_Format(PyExc_ValueError,
26305  "Buffer dtype mismatch, expected %s%s%s but got %s",
26306  quote, expected, quote,
26307  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
26308  } else {
26309  __Pyx_StructField* field = ctx->head->field;
26310  __Pyx_StructField* parent = (ctx->head - 1)->field;
26311  PyErr_Format(PyExc_ValueError,
26312  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
26313  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
26314  parent->type->name, field->name);
26315  }
26316 }
26317 static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
26318  char group;
26319  size_t size, offset, arraysize = 1;
26320  if (ctx->enc_type == 0) return 0;
26321  if (ctx->head->field->type->arraysize[0]) {
26322  int i, ndim = 0;
26323  if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
26324  ctx->is_valid_array = ctx->head->field->type->ndim == 1;
26325  ndim = 1;
26326  if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
26327  PyErr_Format(PyExc_ValueError,
26328  "Expected a dimension of size %zu, got %zu",
26329  ctx->head->field->type->arraysize[0], ctx->enc_count);
26330  return -1;
26331  }
26332  }
26333  if (!ctx->is_valid_array) {
26334  PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
26335  ctx->head->field->type->ndim, ndim);
26336  return -1;
26337  }
26338  for (i = 0; i < ctx->head->field->type->ndim; i++) {
26339  arraysize *= ctx->head->field->type->arraysize[i];
26340  }
26341  ctx->is_valid_array = 0;
26342  ctx->enc_count = 1;
26343  }
26344  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
26345  do {
26346  __Pyx_StructField* field = ctx->head->field;
26347  __Pyx_TypeInfo* type = field->type;
26348  if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
26349  size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
26350  } else {
26351  size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
26352  }
26353  if (ctx->enc_packmode == '@') {
26354  size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
26355  size_t align_mod_offset;
26356  if (align_at == 0) return -1;
26357  align_mod_offset = ctx->fmt_offset % align_at;
26358  if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
26359  if (ctx->struct_alignment == 0)
26360  ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
26361  ctx->is_complex);
26362  }
26363  if (type->size != size || type->typegroup != group) {
26364  if (type->typegroup == 'C' && type->fields != NULL) {
26365  size_t parent_offset = ctx->head->parent_offset + field->offset;
26366  ++ctx->head;
26367  ctx->head->field = type->fields;
26368  ctx->head->parent_offset = parent_offset;
26369  continue;
26370  }
26371  if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
26372  } else {
26373  __Pyx_BufFmt_RaiseExpected(ctx);
26374  return -1;
26375  }
26376  }
26377  offset = ctx->head->parent_offset + field->offset;
26378  if (ctx->fmt_offset != offset) {
26379  PyErr_Format(PyExc_ValueError,
26380  "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
26381  (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
26382  return -1;
26383  }
26384  ctx->fmt_offset += size;
26385  if (arraysize)
26386  ctx->fmt_offset += (arraysize - 1) * size;
26387  --ctx->enc_count;
26388  while (1) {
26389  if (field == &ctx->root) {
26390  ctx->head = NULL;
26391  if (ctx->enc_count != 0) {
26392  __Pyx_BufFmt_RaiseExpected(ctx);
26393  return -1;
26394  }
26395  break;
26396  }
26397  ctx->head->field = ++field;
26398  if (field->type == NULL) {
26399  --ctx->head;
26400  field = ctx->head->field;
26401  continue;
26402  } else if (field->type->typegroup == 'S') {
26403  size_t parent_offset = ctx->head->parent_offset + field->offset;
26404  if (field->type->fields->type == NULL) continue;
26405  field = field->type->fields;
26406  ++ctx->head;
26407  ctx->head->field = field;
26408  ctx->head->parent_offset = parent_offset;
26409  break;
26410  } else {
26411  break;
26412  }
26413  }
26414  } while (ctx->enc_count);
26415  ctx->enc_type = 0;
26416  ctx->is_complex = 0;
26417  return 0;
26418 }
26419 static PyObject *
26420 __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
26421 {
26422  const char *ts = *tsp;
26423  int i = 0, number, ndim;
26424  ++ts;
26425  if (ctx->new_count != 1) {
26426  PyErr_SetString(PyExc_ValueError,
26427  "Cannot handle repeated arrays in format string");
26428  return NULL;
26429  }
26430  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26431  ndim = ctx->head->field->type->ndim;
26432  while (*ts && *ts != ')') {
26433  switch (*ts) {
26434  case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue;
26435  default: break;
26436  }
26437  number = __Pyx_BufFmt_ExpectNumber(&ts);
26438  if (number == -1) return NULL;
26439  if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
26440  return PyErr_Format(PyExc_ValueError,
26441  "Expected a dimension of size %zu, got %d",
26442  ctx->head->field->type->arraysize[i], number);
26443  if (*ts != ',' && *ts != ')')
26444  return PyErr_Format(PyExc_ValueError,
26445  "Expected a comma in format string, got '%c'", *ts);
26446  if (*ts == ',') ts++;
26447  i++;
26448  }
26449  if (i != ndim)
26450  return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
26451  ctx->head->field->type->ndim, i);
26452  if (!*ts) {
26453  PyErr_SetString(PyExc_ValueError,
26454  "Unexpected end of format string, expected ')'");
26455  return NULL;
26456  }
26457  ctx->is_valid_array = 1;
26458  ctx->new_count = 1;
26459  *tsp = ++ts;
26460  return Py_None;
26461 }
26462 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
26463  int got_Z = 0;
26464  while (1) {
26465  switch(*ts) {
26466  case 0:
26467  if (ctx->enc_type != 0 && ctx->head == NULL) {
26468  __Pyx_BufFmt_RaiseExpected(ctx);
26469  return NULL;
26470  }
26471  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26472  if (ctx->head != NULL) {
26473  __Pyx_BufFmt_RaiseExpected(ctx);
26474  return NULL;
26475  }
26476  return ts;
26477  case ' ':
26478  case '\r':
26479  case '\n':
26480  ++ts;
26481  break;
26482  case '<':
26483  if (!__Pyx_Is_Little_Endian()) {
26484  PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
26485  return NULL;
26486  }
26487  ctx->new_packmode = '=';
26488  ++ts;
26489  break;
26490  case '>':
26491  case '!':
26492  if (__Pyx_Is_Little_Endian()) {
26493  PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
26494  return NULL;
26495  }
26496  ctx->new_packmode = '=';
26497  ++ts;
26498  break;
26499  case '=':
26500  case '@':
26501  case '^':
26502  ctx->new_packmode = *ts++;
26503  break;
26504  case 'T':
26505  {
26506  const char* ts_after_sub;
26507  size_t i, struct_count = ctx->new_count;
26508  size_t struct_alignment = ctx->struct_alignment;
26509  ctx->new_count = 1;
26510  ++ts;
26511  if (*ts != '{') {
26512  PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
26513  return NULL;
26514  }
26515  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26516  ctx->enc_type = 0;
26517  ctx->enc_count = 0;
26518  ctx->struct_alignment = 0;
26519  ++ts;
26520  ts_after_sub = ts;
26521  for (i = 0; i != struct_count; ++i) {
26522  ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
26523  if (!ts_after_sub) return NULL;
26524  }
26525  ts = ts_after_sub;
26526  if (struct_alignment) ctx->struct_alignment = struct_alignment;
26527  }
26528  break;
26529  case '}':
26530  {
26531  size_t alignment = ctx->struct_alignment;
26532  ++ts;
26533  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26534  ctx->enc_type = 0;
26535  if (alignment && ctx->fmt_offset % alignment) {
26536  ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
26537  }
26538  }
26539  return ts;
26540  case 'x':
26541  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26542  ctx->fmt_offset += ctx->new_count;
26543  ctx->new_count = 1;
26544  ctx->enc_count = 0;
26545  ctx->enc_type = 0;
26546  ctx->enc_packmode = ctx->new_packmode;
26547  ++ts;
26548  break;
26549  case 'Z':
26550  got_Z = 1;
26551  ++ts;
26552  if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
26553  __Pyx_BufFmt_RaiseUnexpectedChar('Z');
26554  return NULL;
26555  }
26556  CYTHON_FALLTHROUGH;
26557  case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
26558  case 'l': case 'L': case 'q': case 'Q':
26559  case 'f': case 'd': case 'g':
26560  case 'O': case 'p':
26561  if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
26562  (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
26563  ctx->enc_count += ctx->new_count;
26564  ctx->new_count = 1;
26565  got_Z = 0;
26566  ++ts;
26567  break;
26568  }
26569  CYTHON_FALLTHROUGH;
26570  case 's':
26571  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26572  ctx->enc_count = ctx->new_count;
26573  ctx->enc_packmode = ctx->new_packmode;
26574  ctx->enc_type = *ts;
26575  ctx->is_complex = got_Z;
26576  ++ts;
26577  ctx->new_count = 1;
26578  got_Z = 0;
26579  break;
26580  case ':':
26581  ++ts;
26582  while(*ts != ':') ++ts;
26583  ++ts;
26584  break;
26585  case '(':
26586  if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
26587  break;
26588  default:
26589  {
26590  int number = __Pyx_BufFmt_ExpectNumber(&ts);
26591  if (number == -1) return NULL;
26592  ctx->new_count = (size_t)number;
26593  }
26594  }
26595  }
26596 }
26597 
26598 /* TypeInfoCompare */
26599  static int
26600 __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
26601 {
26602  int i;
26603  if (!a || !b)
26604  return 0;
26605  if (a == b)
26606  return 1;
26607  if (a->size != b->size || a->typegroup != b->typegroup ||
26608  a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
26609  if (a->typegroup == 'H' || b->typegroup == 'H') {
26610  return a->size == b->size;
26611  } else {
26612  return 0;
26613  }
26614  }
26615  if (a->ndim) {
26616  for (i = 0; i < a->ndim; i++)
26617  if (a->arraysize[i] != b->arraysize[i])
26618  return 0;
26619  }
26620  if (a->typegroup == 'S') {
26621  if (a->flags != b->flags)
26622  return 0;
26623  if (a->fields || b->fields) {
26624  if (!(a->fields && b->fields))
26625  return 0;
26626  for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
26627  __Pyx_StructField *field_a = a->fields + i;
26628  __Pyx_StructField *field_b = b->fields + i;
26629  if (field_a->offset != field_b->offset ||
26630  !__pyx_typeinfo_cmp(field_a->type, field_b->type))
26631  return 0;
26632  }
26633  return !a->fields[i].type && !b->fields[i].type;
26634  }
26635  }
26636  return 1;
26637 }
26638 
26639 /* MemviewSliceValidateAndInit */
26640  static int
26641 __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
26642 {
26643  if (buf->shape[dim] <= 1)
26644  return 1;
26645  if (buf->strides) {
26646  if (spec & __Pyx_MEMVIEW_CONTIG) {
26647  if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
26648  if (unlikely(buf->strides[dim] != sizeof(void *))) {
26649  PyErr_Format(PyExc_ValueError,
26650  "Buffer is not indirectly contiguous "
26651  "in dimension %d.", dim);
26652  goto fail;
26653  }
26654  } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
26655  PyErr_SetString(PyExc_ValueError,
26656  "Buffer and memoryview are not contiguous "
26657  "in the same dimension.");
26658  goto fail;
26659  }
26660  }
26661  if (spec & __Pyx_MEMVIEW_FOLLOW) {
26662  Py_ssize_t stride = buf->strides[dim];
26663  if (stride < 0)
26664  stride = -stride;
26665  if (unlikely(stride < buf->itemsize)) {
26666  PyErr_SetString(PyExc_ValueError,
26667  "Buffer and memoryview are not contiguous "
26668  "in the same dimension.");
26669  goto fail;
26670  }
26671  }
26672  } else {
26673  if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
26674  PyErr_Format(PyExc_ValueError,
26675  "C-contiguous buffer is not contiguous in "
26676  "dimension %d", dim);
26677  goto fail;
26678  } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
26679  PyErr_Format(PyExc_ValueError,
26680  "C-contiguous buffer is not indirect in "
26681  "dimension %d", dim);
26682  goto fail;
26683  } else if (unlikely(buf->suboffsets)) {
26684  PyErr_SetString(PyExc_ValueError,
26685  "Buffer exposes suboffsets but no strides");
26686  goto fail;
26687  }
26688  }
26689  return 1;
26690 fail:
26691  return 0;
26692 }
26693 static int
26694 __pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec)
26695 {
26696  if (spec & __Pyx_MEMVIEW_DIRECT) {
26697  if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
26698  PyErr_Format(PyExc_ValueError,
26699  "Buffer not compatible with direct access "
26700  "in dimension %d.", dim);
26701  goto fail;
26702  }
26703  }
26704  if (spec & __Pyx_MEMVIEW_PTR) {
26705  if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
26706  PyErr_Format(PyExc_ValueError,
26707  "Buffer is not indirectly accessible "
26708  "in dimension %d.", dim);
26709  goto fail;
26710  }
26711  }
26712  return 1;
26713 fail:
26714  return 0;
26715 }
26716 static int
26717 __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
26718 {
26719  int i;
26720  if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
26721  Py_ssize_t stride = 1;
26722  for (i = 0; i < ndim; i++) {
26723  if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) {
26724  PyErr_SetString(PyExc_ValueError,
26725  "Buffer not fortran contiguous.");
26726  goto fail;
26727  }
26728  stride = stride * buf->shape[i];
26729  }
26730  } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
26731  Py_ssize_t stride = 1;
26732  for (i = ndim - 1; i >- 1; i--) {
26733  if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) {
26734  PyErr_SetString(PyExc_ValueError,
26735  "Buffer not C contiguous.");
26736  goto fail;
26737  }
26738  stride = stride * buf->shape[i];
26739  }
26740  }
26741  return 1;
26742 fail:
26743  return 0;
26744 }
26745 static int __Pyx_ValidateAndInit_memviewslice(
26746  int *axes_specs,
26747  int c_or_f_flag,
26748  int buf_flags,
26749  int ndim,
26750  __Pyx_TypeInfo *dtype,
26751  __Pyx_BufFmt_StackElem stack[],
26752  __Pyx_memviewslice *memviewslice,
26753  PyObject *original_obj)
26754 {
26755  struct __pyx_memoryview_obj *memview, *new_memview;
26756  __Pyx_RefNannyDeclarations
26757  Py_buffer *buf;
26758  int i, spec = 0, retval = -1;
26759  __Pyx_BufFmt_Context ctx;
26760  int from_memoryview = __pyx_memoryview_check(original_obj);
26761  __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
26762  if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
26763  original_obj)->typeinfo)) {
26764  memview = (struct __pyx_memoryview_obj *) original_obj;
26765  new_memview = NULL;
26766  } else {
26767  memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
26768  original_obj, buf_flags, 0, dtype);
26769  new_memview = memview;
26770  if (unlikely(!memview))
26771  goto fail;
26772  }
26773  buf = &memview->view;
26774  if (unlikely(buf->ndim != ndim)) {
26775  PyErr_Format(PyExc_ValueError,
26776  "Buffer has wrong number of dimensions (expected %d, got %d)",
26777  ndim, buf->ndim);
26778  goto fail;
26779  }
26780  if (new_memview) {
26781  __Pyx_BufFmt_Init(&ctx, stack, dtype);
26782  if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
26783  }
26784  if (unlikely((unsigned) buf->itemsize != dtype->size)) {
26785  PyErr_Format(PyExc_ValueError,
26786  "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
26787  "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
26788  buf->itemsize,
26789  (buf->itemsize > 1) ? "s" : "",
26790  dtype->name,
26791  dtype->size,
26792  (dtype->size > 1) ? "s" : "");
26793  goto fail;
26794  }
26795  if (buf->len > 0) {
26796  for (i = 0; i < ndim; i++) {
26797  spec = axes_specs[i];
26798  if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
26799  goto fail;
26800  if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
26801  goto fail;
26802  }
26803  if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
26804  goto fail;
26805  }
26806  if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
26807  new_memview != NULL) == -1)) {
26808  goto fail;
26809  }
26810  retval = 0;
26811  goto no_fail;
26812 fail:
26813  Py_XDECREF(new_memview);
26814  retval = -1;
26815 no_fail:
26816  __Pyx_RefNannyFinishContext();
26817  return retval;
26818 }
26819 
26820 /* ObjectToMemviewSlice */
26821  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_float(PyObject *obj, int writable_flag) {
26822  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
26823  __Pyx_BufFmt_StackElem stack[1];
26824  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
26825  int retcode;
26826  if (obj == Py_None) {
26827  result.memview = (struct __pyx_memoryview_obj *) Py_None;
26828  return result;
26829  }
26830  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
26831  PyBUF_RECORDS_RO | writable_flag, 1,
26832  &__Pyx_TypeInfo_float, stack,
26833  &result, obj);
26834  if (unlikely(retcode == -1))
26835  goto __pyx_fail;
26836  return result;
26837 __pyx_fail:
26838  result.memview = NULL;
26839  result.data = NULL;
26840  return result;
26841 }
26842 
26843 /* ObjectToMemviewSlice */
26844  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *obj, int writable_flag) {
26845  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
26846  __Pyx_BufFmt_StackElem stack[1];
26847  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
26848  int retcode;
26849  if (obj == Py_None) {
26850  result.memview = (struct __pyx_memoryview_obj *) Py_None;
26851  return result;
26852  }
26853  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
26854  PyBUF_RECORDS_RO | writable_flag, 1,
26855  &__Pyx_TypeInfo_double, stack,
26856  &result, obj);
26857  if (unlikely(retcode == -1))
26858  goto __pyx_fail;
26859  return result;
26860 __pyx_fail:
26861  result.memview = NULL;
26862  result.data = NULL;
26863  return result;
26864 }
26865 
26866 /* ObjectToMemviewSlice */
26867  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(PyObject *obj, int writable_flag) {
26868  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
26869  __Pyx_BufFmt_StackElem stack[1];
26870  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
26871  int retcode;
26872  if (obj == Py_None) {
26873  result.memview = (struct __pyx_memoryview_obj *) Py_None;
26874  return result;
26875  }
26876  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
26877  PyBUF_RECORDS_RO | writable_flag, 1,
26878  &__Pyx_TypeInfo_long__double, stack,
26879  &result, obj);
26880  if (unlikely(retcode == -1))
26881  goto __pyx_fail;
26882  return result;
26883 __pyx_fail:
26884  result.memview = NULL;
26885  result.data = NULL;
26886  return result;
26887 }
26888 
26889 /* MemviewSliceCopyTemplate */
26890  static __Pyx_memviewslice
26891 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
26892  const char *mode, int ndim,
26893  size_t sizeof_dtype, int contig_flag,
26894  int dtype_is_object)
26895 {
26896  __Pyx_RefNannyDeclarations
26897  int i;
26898  __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
26899  struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
26900  Py_buffer *buf = &from_memview->view;
26901  PyObject *shape_tuple = NULL;
26902  PyObject *temp_int = NULL;
26903  struct __pyx_array_obj *array_obj = NULL;
26904  struct __pyx_memoryview_obj *memview_obj = NULL;
26905  __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
26906  for (i = 0; i < ndim; i++) {
26907  if (unlikely(from_mvs->suboffsets[i] >= 0)) {
26908  PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
26909  "indirect dimensions (axis %d)", i);
26910  goto fail;
26911  }
26912  }
26913  shape_tuple = PyTuple_New(ndim);
26914  if (unlikely(!shape_tuple)) {
26915  goto fail;
26916  }
26917  __Pyx_GOTREF(shape_tuple);
26918  for(i = 0; i < ndim; i++) {
26919  temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
26920  if(unlikely(!temp_int)) {
26921  goto fail;
26922  } else {
26923  PyTuple_SET_ITEM(shape_tuple, i, temp_int);
26924  temp_int = NULL;
26925  }
26926  }
26927  array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
26928  if (unlikely(!array_obj)) {
26929  goto fail;
26930  }
26931  __Pyx_GOTREF(array_obj);
26932  memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
26933  (PyObject *) array_obj, contig_flag,
26934  dtype_is_object,
26935  from_mvs->memview->typeinfo);
26936  if (unlikely(!memview_obj))
26937  goto fail;
26938  if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
26939  goto fail;
26940  if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
26941  dtype_is_object) < 0))
26942  goto fail;
26943  goto no_fail;
26944 fail:
26945  __Pyx_XDECREF(new_mvs.memview);
26946  new_mvs.memview = NULL;
26947  new_mvs.data = NULL;
26948 no_fail:
26949  __Pyx_XDECREF(shape_tuple);
26950  __Pyx_XDECREF(temp_int);
26951  __Pyx_XDECREF(array_obj);
26952  __Pyx_RefNannyFinishContext();
26953  return new_mvs;
26954 }
26955 
26956 /* CIntToPy */
26957  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
26958 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
26959 #pragma GCC diagnostic push
26960 #pragma GCC diagnostic ignored "-Wconversion"
26961 #endif
26962  const int neg_one = (int) -1, const_zero = (int) 0;
26963 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
26964 #pragma GCC diagnostic pop
26965 #endif
26966  const int is_unsigned = neg_one > const_zero;
26967  if (is_unsigned) {
26968  if (sizeof(int) < sizeof(long)) {
26969  return PyInt_FromLong((long) value);
26970  } else if (sizeof(int) <= sizeof(unsigned long)) {
26971  return PyLong_FromUnsignedLong((unsigned long) value);
26972 #ifdef HAVE_LONG_LONG
26973  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
26974  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
26975 #endif
26976  }
26977  } else {
26978  if (sizeof(int) <= sizeof(long)) {
26979  return PyInt_FromLong((long) value);
26980 #ifdef HAVE_LONG_LONG
26981  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
26982  return PyLong_FromLongLong((PY_LONG_LONG) value);
26983 #endif
26984  }
26985  }
26986  {
26987  int one = 1; int little = (int)*(unsigned char *)&one;
26988  unsigned char *bytes = (unsigned char *)&value;
26989  return _PyLong_FromByteArray(bytes, sizeof(int),
26990  little, !is_unsigned);
26991  }
26992 }
26993 
26994 /* CIntFromPyVerify */
26995  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
26996  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
26997 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
26998  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
26999 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
27000  {\
27001  func_type value = func_value;\
27002  if (sizeof(target_type) < sizeof(func_type)) {\
27003  if (unlikely(value != (func_type) (target_type) value)) {\
27004  func_type zero = 0;\
27005  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
27006  return (target_type) -1;\
27007  if (is_unsigned && unlikely(value < zero))\
27008  goto raise_neg_overflow;\
27009  else\
27010  goto raise_overflow;\
27011  }\
27012  }\
27013  return (target_type) value;\
27014  }
27015 
27016 /* CIntFromPy */
27017  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
27018 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27019 #pragma GCC diagnostic push
27020 #pragma GCC diagnostic ignored "-Wconversion"
27021 #endif
27022  const int neg_one = (int) -1, const_zero = (int) 0;
27023 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27024 #pragma GCC diagnostic pop
27025 #endif
27026  const int is_unsigned = neg_one > const_zero;
27027 #if PY_MAJOR_VERSION < 3
27028  if (likely(PyInt_Check(x))) {
27029  if (sizeof(int) < sizeof(long)) {
27030  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
27031  } else {
27032  long val = PyInt_AS_LONG(x);
27033  if (is_unsigned && unlikely(val < 0)) {
27034  goto raise_neg_overflow;
27035  }
27036  return (int) val;
27037  }
27038  } else
27039 #endif
27040  if (likely(PyLong_Check(x))) {
27041  if (is_unsigned) {
27042 #if CYTHON_USE_PYLONG_INTERNALS
27043  const digit* digits = ((PyLongObject*)x)->ob_digit;
27044  switch (Py_SIZE(x)) {
27045  case 0: return (int) 0;
27046  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
27047  case 2:
27048  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
27049  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27050  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27051  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
27052  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
27053  }
27054  }
27055  break;
27056  case 3:
27057  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
27058  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27059  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27060  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
27061  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
27062  }
27063  }
27064  break;
27065  case 4:
27066  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
27067  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27068  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27069  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
27070  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
27071  }
27072  }
27073  break;
27074  }
27075 #endif
27076 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
27077  if (unlikely(Py_SIZE(x) < 0)) {
27078  goto raise_neg_overflow;
27079  }
27080 #else
27081  {
27082  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
27083  if (unlikely(result < 0))
27084  return (int) -1;
27085  if (unlikely(result == 1))
27086  goto raise_neg_overflow;
27087  }
27088 #endif
27089  if (sizeof(int) <= sizeof(unsigned long)) {
27090  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
27091 #ifdef HAVE_LONG_LONG
27092  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
27093  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
27094 #endif
27095  }
27096  } else {
27097 #if CYTHON_USE_PYLONG_INTERNALS
27098  const digit* digits = ((PyLongObject*)x)->ob_digit;
27099  switch (Py_SIZE(x)) {
27100  case 0: return (int) 0;
27101  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
27102  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
27103  case -2:
27104  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
27105  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27106  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27107  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
27108  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27109  }
27110  }
27111  break;
27112  case 2:
27113  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
27114  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27115  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27116  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
27117  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27118  }
27119  }
27120  break;
27121  case -3:
27122  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
27123  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27124  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27125  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
27126  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27127  }
27128  }
27129  break;
27130  case 3:
27131  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
27132  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27133  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27134  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
27135  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27136  }
27137  }
27138  break;
27139  case -4:
27140  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
27141  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27142  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27143  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
27144  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27145  }
27146  }
27147  break;
27148  case 4:
27149  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
27150  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27151  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27152  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
27153  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27154  }
27155  }
27156  break;
27157  }
27158 #endif
27159  if (sizeof(int) <= sizeof(long)) {
27160  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
27161 #ifdef HAVE_LONG_LONG
27162  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
27163  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
27164 #endif
27165  }
27166  }
27167  {
27168 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
27169  PyErr_SetString(PyExc_RuntimeError,
27170  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
27171 #else
27172  int val;
27173  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
27174  #if PY_MAJOR_VERSION < 3
27175  if (likely(v) && !PyLong_Check(v)) {
27176  PyObject *tmp = v;
27177  v = PyNumber_Long(tmp);
27178  Py_DECREF(tmp);
27179  }
27180  #endif
27181  if (likely(v)) {
27182  int one = 1; int is_little = (int)*(unsigned char *)&one;
27183  unsigned char *bytes = (unsigned char *)&val;
27184  int ret = _PyLong_AsByteArray((PyLongObject *)v,
27185  bytes, sizeof(val),
27186  is_little, !is_unsigned);
27187  Py_DECREF(v);
27188  if (likely(!ret))
27189  return val;
27190  }
27191 #endif
27192  return (int) -1;
27193  }
27194  } else {
27195  int val;
27196  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
27197  if (!tmp) return (int) -1;
27198  val = __Pyx_PyInt_As_int(tmp);
27199  Py_DECREF(tmp);
27200  return val;
27201  }
27202 raise_overflow:
27203  PyErr_SetString(PyExc_OverflowError,
27204  "value too large to convert to int");
27205  return (int) -1;
27206 raise_neg_overflow:
27207  PyErr_SetString(PyExc_OverflowError,
27208  "can't convert negative value to int");
27209  return (int) -1;
27210 }
27211 
27212 /* CIntFromPy */
27213  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
27214 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27215 #pragma GCC diagnostic push
27216 #pragma GCC diagnostic ignored "-Wconversion"
27217 #endif
27218  const long neg_one = (long) -1, const_zero = (long) 0;
27219 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27220 #pragma GCC diagnostic pop
27221 #endif
27222  const int is_unsigned = neg_one > const_zero;
27223 #if PY_MAJOR_VERSION < 3
27224  if (likely(PyInt_Check(x))) {
27225  if (sizeof(long) < sizeof(long)) {
27226  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
27227  } else {
27228  long val = PyInt_AS_LONG(x);
27229  if (is_unsigned && unlikely(val < 0)) {
27230  goto raise_neg_overflow;
27231  }
27232  return (long) val;
27233  }
27234  } else
27235 #endif
27236  if (likely(PyLong_Check(x))) {
27237  if (is_unsigned) {
27238 #if CYTHON_USE_PYLONG_INTERNALS
27239  const digit* digits = ((PyLongObject*)x)->ob_digit;
27240  switch (Py_SIZE(x)) {
27241  case 0: return (long) 0;
27242  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
27243  case 2:
27244  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
27245  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27246  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27247  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
27248  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
27249  }
27250  }
27251  break;
27252  case 3:
27253  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
27254  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27255  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27256  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
27257  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
27258  }
27259  }
27260  break;
27261  case 4:
27262  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
27263  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27264  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27265  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
27266  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
27267  }
27268  }
27269  break;
27270  }
27271 #endif
27272 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
27273  if (unlikely(Py_SIZE(x) < 0)) {
27274  goto raise_neg_overflow;
27275  }
27276 #else
27277  {
27278  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
27279  if (unlikely(result < 0))
27280  return (long) -1;
27281  if (unlikely(result == 1))
27282  goto raise_neg_overflow;
27283  }
27284 #endif
27285  if (sizeof(long) <= sizeof(unsigned long)) {
27286  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
27287 #ifdef HAVE_LONG_LONG
27288  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
27289  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
27290 #endif
27291  }
27292  } else {
27293 #if CYTHON_USE_PYLONG_INTERNALS
27294  const digit* digits = ((PyLongObject*)x)->ob_digit;
27295  switch (Py_SIZE(x)) {
27296  case 0: return (long) 0;
27297  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
27298  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
27299  case -2:
27300  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
27301  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27302  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27303  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
27304  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27305  }
27306  }
27307  break;
27308  case 2:
27309  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
27310  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27311  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27312  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
27313  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27314  }
27315  }
27316  break;
27317  case -3:
27318  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
27319  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27320  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27321  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
27322  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27323  }
27324  }
27325  break;
27326  case 3:
27327  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
27328  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27329  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27330  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
27331  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27332  }
27333  }
27334  break;
27335  case -4:
27336  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
27337  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27338  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27339  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
27340  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27341  }
27342  }
27343  break;
27344  case 4:
27345  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
27346  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27347  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27348  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
27349  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27350  }
27351  }
27352  break;
27353  }
27354 #endif
27355  if (sizeof(long) <= sizeof(long)) {
27356  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
27357 #ifdef HAVE_LONG_LONG
27358  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
27359  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
27360 #endif
27361  }
27362  }
27363  {
27364 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
27365  PyErr_SetString(PyExc_RuntimeError,
27366  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
27367 #else
27368  long val;
27369  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
27370  #if PY_MAJOR_VERSION < 3
27371  if (likely(v) && !PyLong_Check(v)) {
27372  PyObject *tmp = v;
27373  v = PyNumber_Long(tmp);
27374  Py_DECREF(tmp);
27375  }
27376  #endif
27377  if (likely(v)) {
27378  int one = 1; int is_little = (int)*(unsigned char *)&one;
27379  unsigned char *bytes = (unsigned char *)&val;
27380  int ret = _PyLong_AsByteArray((PyLongObject *)v,
27381  bytes, sizeof(val),
27382  is_little, !is_unsigned);
27383  Py_DECREF(v);
27384  if (likely(!ret))
27385  return val;
27386  }
27387 #endif
27388  return (long) -1;
27389  }
27390  } else {
27391  long val;
27392  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
27393  if (!tmp) return (long) -1;
27394  val = __Pyx_PyInt_As_long(tmp);
27395  Py_DECREF(tmp);
27396  return val;
27397  }
27398 raise_overflow:
27399  PyErr_SetString(PyExc_OverflowError,
27400  "value too large to convert to long");
27401  return (long) -1;
27402 raise_neg_overflow:
27403  PyErr_SetString(PyExc_OverflowError,
27404  "can't convert negative value to long");
27405  return (long) -1;
27406 }
27407 
27408 /* CIntToPy */
27409  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
27410 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27411 #pragma GCC diagnostic push
27412 #pragma GCC diagnostic ignored "-Wconversion"
27413 #endif
27414  const long neg_one = (long) -1, const_zero = (long) 0;
27415 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27416 #pragma GCC diagnostic pop
27417 #endif
27418  const int is_unsigned = neg_one > const_zero;
27419  if (is_unsigned) {
27420  if (sizeof(long) < sizeof(long)) {
27421  return PyInt_FromLong((long) value);
27422  } else if (sizeof(long) <= sizeof(unsigned long)) {
27423  return PyLong_FromUnsignedLong((unsigned long) value);
27424 #ifdef HAVE_LONG_LONG
27425  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
27426  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
27427 #endif
27428  }
27429  } else {
27430  if (sizeof(long) <= sizeof(long)) {
27431  return PyInt_FromLong((long) value);
27432 #ifdef HAVE_LONG_LONG
27433  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
27434  return PyLong_FromLongLong((PY_LONG_LONG) value);
27435 #endif
27436  }
27437  }
27438  {
27439  int one = 1; int little = (int)*(unsigned char *)&one;
27440  unsigned char *bytes = (unsigned char *)&value;
27441  return _PyLong_FromByteArray(bytes, sizeof(long),
27442  little, !is_unsigned);
27443  }
27444 }
27445 
27446 /* CIntFromPy */
27447  static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
27448 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27449 #pragma GCC diagnostic push
27450 #pragma GCC diagnostic ignored "-Wconversion"
27451 #endif
27452  const char neg_one = (char) -1, const_zero = (char) 0;
27453 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27454 #pragma GCC diagnostic pop
27455 #endif
27456  const int is_unsigned = neg_one > const_zero;
27457 #if PY_MAJOR_VERSION < 3
27458  if (likely(PyInt_Check(x))) {
27459  if (sizeof(char) < sizeof(long)) {
27460  __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
27461  } else {
27462  long val = PyInt_AS_LONG(x);
27463  if (is_unsigned && unlikely(val < 0)) {
27464  goto raise_neg_overflow;
27465  }
27466  return (char) val;
27467  }
27468  } else
27469 #endif
27470  if (likely(PyLong_Check(x))) {
27471  if (is_unsigned) {
27472 #if CYTHON_USE_PYLONG_INTERNALS
27473  const digit* digits = ((PyLongObject*)x)->ob_digit;
27474  switch (Py_SIZE(x)) {
27475  case 0: return (char) 0;
27476  case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
27477  case 2:
27478  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
27479  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27480  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27481  } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
27482  return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
27483  }
27484  }
27485  break;
27486  case 3:
27487  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
27488  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27489  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27490  } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
27491  return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
27492  }
27493  }
27494  break;
27495  case 4:
27496  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
27497  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27498  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27499  } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
27500  return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
27501  }
27502  }
27503  break;
27504  }
27505 #endif
27506 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
27507  if (unlikely(Py_SIZE(x) < 0)) {
27508  goto raise_neg_overflow;
27509  }
27510 #else
27511  {
27512  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
27513  if (unlikely(result < 0))
27514  return (char) -1;
27515  if (unlikely(result == 1))
27516  goto raise_neg_overflow;
27517  }
27518 #endif
27519  if (sizeof(char) <= sizeof(unsigned long)) {
27520  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
27521 #ifdef HAVE_LONG_LONG
27522  } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
27523  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
27524 #endif
27525  }
27526  } else {
27527 #if CYTHON_USE_PYLONG_INTERNALS
27528  const digit* digits = ((PyLongObject*)x)->ob_digit;
27529  switch (Py_SIZE(x)) {
27530  case 0: return (char) 0;
27531  case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
27532  case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0])
27533  case -2:
27534  if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
27535  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27536  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27537  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
27538  return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27539  }
27540  }
27541  break;
27542  case 2:
27543  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
27544  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27545  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27546  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
27547  return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27548  }
27549  }
27550  break;
27551  case -3:
27552  if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
27553  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27554  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27555  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
27556  return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27557  }
27558  }
27559  break;
27560  case 3:
27561  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
27562  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27563  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27564  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
27565  return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27566  }
27567  }
27568  break;
27569  case -4:
27570  if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
27571  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27572  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27573  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
27574  return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27575  }
27576  }
27577  break;
27578  case 4:
27579  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
27580  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27581  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27582  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
27583  return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27584  }
27585  }
27586  break;
27587  }
27588 #endif
27589  if (sizeof(char) <= sizeof(long)) {
27590  __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
27591 #ifdef HAVE_LONG_LONG
27592  } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
27593  __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
27594 #endif
27595  }
27596  }
27597  {
27598 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
27599  PyErr_SetString(PyExc_RuntimeError,
27600  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
27601 #else
27602  char val;
27603  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
27604  #if PY_MAJOR_VERSION < 3
27605  if (likely(v) && !PyLong_Check(v)) {
27606  PyObject *tmp = v;
27607  v = PyNumber_Long(tmp);
27608  Py_DECREF(tmp);
27609  }
27610  #endif
27611  if (likely(v)) {
27612  int one = 1; int is_little = (int)*(unsigned char *)&one;
27613  unsigned char *bytes = (unsigned char *)&val;
27614  int ret = _PyLong_AsByteArray((PyLongObject *)v,
27615  bytes, sizeof(val),
27616  is_little, !is_unsigned);
27617  Py_DECREF(v);
27618  if (likely(!ret))
27619  return val;
27620  }
27621 #endif
27622  return (char) -1;
27623  }
27624  } else {
27625  char val;
27626  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
27627  if (!tmp) return (char) -1;
27628  val = __Pyx_PyInt_As_char(tmp);
27629  Py_DECREF(tmp);
27630  return val;
27631  }
27632 raise_overflow:
27633  PyErr_SetString(PyExc_OverflowError,
27634  "value too large to convert to char");
27635  return (char) -1;
27636 raise_neg_overflow:
27637  PyErr_SetString(PyExc_OverflowError,
27638  "can't convert negative value to char");
27639  return (char) -1;
27640 }
27641 
27642 /* CheckBinaryVersion */
27643  static int __Pyx_check_binary_version(void) {
27644  char ctversion[5];
27645  int same=1, i, found_dot;
27646  const char* rt_from_call = Py_GetVersion();
27647  PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
27648  found_dot = 0;
27649  for (i = 0; i < 4; i++) {
27650  if (!ctversion[i]) {
27651  same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
27652  break;
27653  }
27654  if (rt_from_call[i] != ctversion[i]) {
27655  same = 0;
27656  break;
27657  }
27658  }
27659  if (!same) {
27660  char rtversion[5] = {'\0'};
27661  char message[200];
27662  for (i=0; i<4; ++i) {
27663  if (rt_from_call[i] == '.') {
27664  if (found_dot) break;
27665  found_dot = 1;
27666  } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
27667  break;
27668  }
27669  rtversion[i] = rt_from_call[i];
27670  }
27671  PyOS_snprintf(message, sizeof(message),
27672  "compiletime version %s of module '%.100s' "
27673  "does not match runtime version %s",
27674  ctversion, __Pyx_MODULE_NAME, rtversion);
27675  return PyErr_WarnEx(NULL, message, 1);
27676  }
27677  return 0;
27678 }
27679 
27680 /* InitStrings */
27681  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
27682  while (t->p) {
27683  #if PY_MAJOR_VERSION < 3
27684  if (t->is_unicode) {
27685  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
27686  } else if (t->intern) {
27687  *t->p = PyString_InternFromString(t->s);
27688  } else {
27689  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
27690  }
27691  #else
27692  if (t->is_unicode | t->is_str) {
27693  if (t->intern) {
27694  *t->p = PyUnicode_InternFromString(t->s);
27695  } else if (t->encoding) {
27696  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
27697  } else {
27698  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
27699  }
27700  } else {
27701  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
27702  }
27703  #endif
27704  if (!*t->p)
27705  return -1;
27706  if (PyObject_Hash(*t->p) == -1)
27707  return -1;
27708  ++t;
27709  }
27710  return 0;
27711 }
27712 
27713 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
27714  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
27715 }
27716 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
27717  Py_ssize_t ignore;
27718  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
27719 }
27720 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
27721 #if !CYTHON_PEP393_ENABLED
27722 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
27723  char* defenc_c;
27724  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
27725  if (!defenc) return NULL;
27726  defenc_c = PyBytes_AS_STRING(defenc);
27727 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
27728  {
27729  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
27730  char* c;
27731  for (c = defenc_c; c < end; c++) {
27732  if ((unsigned char) (*c) >= 128) {
27733  PyUnicode_AsASCIIString(o);
27734  return NULL;
27735  }
27736  }
27737  }
27738 #endif
27739  *length = PyBytes_GET_SIZE(defenc);
27740  return defenc_c;
27741 }
27742 #else
27743 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
27744  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
27745 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
27746  if (likely(PyUnicode_IS_ASCII(o))) {
27747  *length = PyUnicode_GET_LENGTH(o);
27748  return PyUnicode_AsUTF8(o);
27749  } else {
27750  PyUnicode_AsASCIIString(o);
27751  return NULL;
27752  }
27753 #else
27754  return PyUnicode_AsUTF8AndSize(o, length);
27755 #endif
27756 }
27757 #endif
27758 #endif
27759 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
27760 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
27761  if (
27762 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
27763  __Pyx_sys_getdefaultencoding_not_ascii &&
27764 #endif
27765  PyUnicode_Check(o)) {
27766  return __Pyx_PyUnicode_AsStringAndSize(o, length);
27767  } else
27768 #endif
27769 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
27770  if (PyByteArray_Check(o)) {
27771  *length = PyByteArray_GET_SIZE(o);
27772  return PyByteArray_AS_STRING(o);
27773  } else
27774 #endif
27775  {
27776  char* result;
27777  int r = PyBytes_AsStringAndSize(o, &result, length);
27778  if (unlikely(r < 0)) {
27779  return NULL;
27780  } else {
27781  return result;
27782  }
27783  }
27784 }
27785 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
27786  int is_true = x == Py_True;
27787  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
27788  else return PyObject_IsTrue(x);
27789 }
27790 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
27791  int retval;
27792  if (unlikely(!x)) return -1;
27793  retval = __Pyx_PyObject_IsTrue(x);
27794  Py_DECREF(x);
27795  return retval;
27796 }
27797 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
27798 #if PY_MAJOR_VERSION >= 3
27799  if (PyLong_Check(result)) {
27800  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
27801  "__int__ returned non-int (type %.200s). "
27802  "The ability to return an instance of a strict subclass of int "
27803  "is deprecated, and may be removed in a future version of Python.",
27804  Py_TYPE(result)->tp_name)) {
27805  Py_DECREF(result);
27806  return NULL;
27807  }
27808  return result;
27809  }
27810 #endif
27811  PyErr_Format(PyExc_TypeError,
27812  "__%.4s__ returned non-%.4s (type %.200s)",
27813  type_name, type_name, Py_TYPE(result)->tp_name);
27814  Py_DECREF(result);
27815  return NULL;
27816 }
27817 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
27818 #if CYTHON_USE_TYPE_SLOTS
27819  PyNumberMethods *m;
27820 #endif
27821  const char *name = NULL;
27822  PyObject *res = NULL;
27823 #if PY_MAJOR_VERSION < 3
27824  if (likely(PyInt_Check(x) || PyLong_Check(x)))
27825 #else
27826  if (likely(PyLong_Check(x)))
27827 #endif
27828  return __Pyx_NewRef(x);
27829 #if CYTHON_USE_TYPE_SLOTS
27830  m = Py_TYPE(x)->tp_as_number;
27831  #if PY_MAJOR_VERSION < 3
27832  if (m && m->nb_int) {
27833  name = "int";
27834  res = m->nb_int(x);
27835  }
27836  else if (m && m->nb_long) {
27837  name = "long";
27838  res = m->nb_long(x);
27839  }
27840  #else
27841  if (likely(m && m->nb_int)) {
27842  name = "int";
27843  res = m->nb_int(x);
27844  }
27845  #endif
27846 #else
27847  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
27848  res = PyNumber_Int(x);
27849  }
27850 #endif
27851  if (likely(res)) {
27852 #if PY_MAJOR_VERSION < 3
27853  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
27854 #else
27855  if (unlikely(!PyLong_CheckExact(res))) {
27856 #endif
27857  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
27858  }
27859  }
27860  else if (!PyErr_Occurred()) {
27861  PyErr_SetString(PyExc_TypeError,
27862  "an integer is required");
27863  }
27864  return res;
27865 }
27866 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
27867  Py_ssize_t ival;
27868  PyObject *x;
27869 #if PY_MAJOR_VERSION < 3
27870  if (likely(PyInt_CheckExact(b))) {
27871  if (sizeof(Py_ssize_t) >= sizeof(long))
27872  return PyInt_AS_LONG(b);
27873  else
27874  return PyInt_AsSsize_t(b);
27875  }
27876 #endif
27877  if (likely(PyLong_CheckExact(b))) {
27878  #if CYTHON_USE_PYLONG_INTERNALS
27879  const digit* digits = ((PyLongObject*)b)->ob_digit;
27880  const Py_ssize_t size = Py_SIZE(b);
27881  if (likely(__Pyx_sst_abs(size) <= 1)) {
27882  ival = likely(size) ? digits[0] : 0;
27883  if (size == -1) ival = -ival;
27884  return ival;
27885  } else {
27886  switch (size) {
27887  case 2:
27888  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
27889  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
27890  }
27891  break;
27892  case -2:
27893  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
27894  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
27895  }
27896  break;
27897  case 3:
27898  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
27899  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
27900  }
27901  break;
27902  case -3:
27903  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
27904  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
27905  }
27906  break;
27907  case 4:
27908  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
27909  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
27910  }
27911  break;
27912  case -4:
27913  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
27914  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
27915  }
27916  break;
27917  }
27918  }
27919  #endif
27920  return PyLong_AsSsize_t(b);
27921  }
27922  x = PyNumber_Index(b);
27923  if (!x) return -1;
27924  ival = PyInt_AsSsize_t(x);
27925  Py_DECREF(x);
27926  return ival;
27927 }
27928 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
27929  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
27930  return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
27931 #if PY_MAJOR_VERSION < 3
27932  } else if (likely(PyInt_CheckExact(o))) {
27933  return PyInt_AS_LONG(o);
27934 #endif
27935  } else {
27936  Py_ssize_t ival;
27937  PyObject *x;
27938  x = PyNumber_Index(o);
27939  if (!x) return -1;
27940  ival = PyInt_AsLong(x);
27941  Py_DECREF(x);
27942  return ival;
27943  }
27944 }
27945 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
27946  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
27947 }
27948 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
27949  return PyInt_FromSize_t(ival);
27950 }
27951 
27952 
27953 #endif /* Py_PYTHON_H */
Base class for linear operators. This class serves as interface for all derived classes.
int LongIndexType
Definition: types.h:60